Systems and methods for agent based building simulation for optimal control

ABSTRACT

A system for a building management system simulation includes one or more processors and memory. The memory includes instructions stored thereon, that when executed by the one or more processors, cause the one or more processors to generate a space agent representing a space in a building, the space agent to maintain an environmental condition of the space based on an optimization state of the space, generate an equipment agent representing a device that serves the space, and register the space agent and the equipment agent to a space communication channel associated with the space. The space agent communicates with the equipment agent over the space communication channel.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.16/036,685, filed on Jul. 16, 2018, which claims the benefit of andpriority to U.S. Provisional Patent Application No. 62/533,581 filedJul. 17, 2017, the entire disclosures of both of which are incorporatedby reference herein.

BACKGROUND

The present disclosure relates generally to building management systems(BMS). The present disclosure relates more particularly to systems andmethods for agent based building simulations for providing optimalcontrol of the BMS.

A BMS is, in general, a system of devices configured to control,monitor, and manage equipment in or around a building or building area.Buildings, such as commercial buildings, typically have a variety ofsystems installed. The systems are used to manage the security, fire,access control, video surveillance, and environmental factors thatrelate to the building and the occupants thereof. Such systems may eachperform discrete operations. Further, the components and devices withineach system are typically manufactured by different corporations, andtherefore often do not interact directly or easily with each other. Insome instances, BMS systems have been implemented to monitor the databeing generated by each system, and to subsequently use that data todirect the operation of other systems or group of systems as a whole.For example, some BMS systems monitor the fire detection systems, andcan shut down the air intake fans when a fire is detected. These systemsmay also interact with transportations systems, such as escalators, suchthat they all operate in a direction that moves occupants toward thebuilding exits. Similarly, these systems may control elevator cars toeither stop at the closest floor or brought to the lobby, or otheregress point. Such functionality allows the building systems toautomatically react appropriately to any threat to the buildingoccupants. However, such reactions are generally scripted (orpre-programmed), and in some cases, could cause unwanted situations dueto the predefined nature of the programmed actions.

SUMMARY

One implementation of the present disclosure is a system for a buildingmanagement system (BMS) simulation. The system includes one or moreprocessors and memory connected to the one or more processors. Thememory has instructions stored thereon that when executed by the one ormore processors, cause the one or more processors to generate a spaceagent representing a space in a building, the space agent configured tomaintain an environmental condition of the space based on anoptimization state of the space, generate an equipment agentrepresenting a device that serves the space, and register the spaceagent and the equipment agent to a space communication channelassociated with the space. The space agent is configured to communicatewith the equipment agent over the space communication channel.

In some embodiments, the environmental condition may correspond to atemperature setpoint.

In some embodiments, the space agent may be configured to set thetemperature setpoint based on the optimization state.

In some embodiments, the instructions may further cause the one or moreprocessors to generate a control agent having control logic to controlthe environmental condition of the space, and register the control agentto the space communication channel associated with the space. In someembodiments, the control agent may be configured to communicate with thespace agent over the space communication channel to provide the controllogic to the space agent.

In some embodiments, the space agent may be configured to communicatewith the equipment agent and the control agent by publishing messages tothe space communication channel and receiving messages published by theequipment agent and the control agent from the space communicationchannel.

In some embodiments, the control logic may correspond to theoptimization state.

In some embodiments, the control logic may override the optimizationstate.

In some embodiments, the space may be a room within the building, andthe instructions may further cause the one or more processors togenerate a floor agent representing a floor within the building on whichthe room is located, and register the floor agent and the space agent toa floor communication channel associated with the floor. In someembodiments, the floor agent may be configured to communicate with thespace agent over the floor communication channel.

In some embodiments, the instructions may further cause the one or moreprocessors to generate a building agent representing the building, andregister the building agent and the floor agent to a buildingcommunication channel associated with the building. In some embodiments,the building agent may be configured to communicate with the floor agentover the building communication channel.

In some embodiments, the building agent may be configured to overridecontrols of each of the other agents by publishing messages on thebuilding communication channel, and the floor agent may be configured tooverride controls of the space agent by publishing messages on the floorcommunication channel.

Another implementation of the present disclosure is a method forsimulating a building management system, the method includinggenerating, by one or more processors, a space agent representing aspace in a building, the space agent configured to maintain anenvironmental condition of the space based on an optimization state ofthe space, generating, by the one or more processors, an equipment agentrepresenting a device that serves the space, and registering, by the oneor more processors, the space agent and the equipment agent to a spacecommunication channel associated with the space. The space agent isconfigured to communicate with the equipment agent over the spacecommunication channel.

In some embodiments, the environmental condition may correspond to atemperature setpoint.

In some embodiments, the space agent may be configured to set thetemperature setpoint based on the optimization state.

In some embodiments, the method may further include generating, by theone or more processors a control agent having control logic to controlthe environmental condition of the space, and registering, by the one ormore processors, the control agent to the space communication channelassociated with the space. In some embodiments, the control agent may beconfigured to communicate with the space agent over the spacecommunication channel to provide the control logic to the space agent.

In some embodiments, the space agent may be configured to communicatewith the equipment agent and the control agent by publishing messages tothe space communication channel and receiving messages published by theequipment agent and the control agent from the space communicationchannel.

In some embodiments, the control logic may correspond to theoptimization state.

In some embodiments, the control logic may override the optimizationstate.

In some embodiments, the space may be a room within the building, andthe method may further include generating, by the one or moreprocessors, a floor agent representing a floor within the building onwhich the room is located, and registering, by the one or moreprocessors, the floor agent and the space agent to a floor communicationchannel associated with the floor. In some embodiments, the floor agentmay be configured to communicate with the space agent over the floorcommunication channel.

In some embodiments, the method may further include generating, by theone or more processors, a building agent representing the building, andregistering, by the one or more processors, the building agent and thefloor agent to a building communication channel associated with thebuilding. In some embodiments, the building agent may be configured tocommunicate with the floor agent over the building communicationchannel.

In some embodiments, the building agent may be configured to overridecontrols of each of the other agents by publishing messages on thebuilding communication channel, and the floor agent may be configured tooverride controls of the space agent by publishing messages on the floorcommunication channel.

Those skilled in the art will appreciate that the summary isillustrative only and is not intended to be in any way limiting. Otheraspects, inventive features, and advantages of the devices and/orprocesses described herein, as defined solely by the claims and theirequivalents, will become apparent in the detailed description set forthherein and taken in conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a drawing of a building equipped with a building managementsystem (BMS) and a HVAC system, according to some embodiments.

FIG. 2 is a schematic of a waterside system which can be used as part ofthe HVAC system of FIG. 1, according to some embodiments.

FIG. 3 is a block diagram of an airside system which can be used as partof the HVAC system of FIG. 1, according to some embodiments.

FIG. 4 is a block diagram of a BMS which can be used in the building ofFIG. 1, according to some embodiments.

FIG. 5 is a block diagram illustrating an adaptive agent based controlsystem, according to some embodiments.

FIG. 6 is a block diagram showing a detailed view of the learning engineshown in FIG. 5, according to some embodiments.

FIG. 7A is a block diagram of an agent for controlling the temperatureof an environment, according to an exemplary embodiment.

FIG. 7B is a table illustrating results for an initial loop through themachine learning process of the agent in FIG. 7A, according to anexemplary embodiment.

FIG. 8A is a table illustrating results for a plurality of loops throughthe machine learning process of the agent in FIG. 7A, according to anexemplary embodiment.

FIG. 8B is a block diagram of an agent for selecting a next action tocontrol the temperature of an environment, according to an exemplaryembodiment.

FIG. 9 is a block diagram schematic of the processing circuit of thecontroller shown in FIG. 5, according to an exemplary embodiment.

FIG. 10 is a temporary occupancy override agent, according to oneexemplary embodiment.

FIG. 11 is a block diagram of an agent-based communication system,according to some embodiments.

FIGS. 12A and 12B are various flow charts illustrating a number ofpublish-subscribe messaging patterns, according to some embodiments.

FIG. 13 is an example channel hierarchal structure, according to anexemplary embodiment.

FIG. 14 is a flow diagram illustration a process for a buildingmanagement system simulation, according to an exemplary embodiment.

DETAILED DESCRIPTION

As shown in the Figures, a building management system (BMS) utilizingagent based building simulation to provide optimal control is shown.Agent based BMS control systems are further described in U.S. Pat. No.9,817,383 (app. Ser. No. 15/367,167), filed Dec. 1, 2016, the entirecontent of which is incorporated by reference herein. Agent based BMSdynamic channel communications are further described in U.S. patentapplication Ser. No. 15/934,593, filed Mar. 23, 2018, the entire contentof which is incorporated by reference herein.

In various embodiments of the present disclosure, various agents areused to simulate a building or system, so that each space, equipment,and/or control functions for the building or system is simulated by asoftware agent. For example, according to various embodiments, variousagents are used to simulate, control, and/or monitor any suitableenvironmental or operational aspects of a building, such as temperature,humidity, particulate count, occupancy time (actual and/or expected),lighting, audio/visual, fire safety, electrical, security, accesscontrol, lifts/escalators, and/or the like. The use of agents to aid insimulation of a building or system provide multiple advantages to a BMSsystems. For example, agent based building simulation may allow for asingle integrated system from design to commissioning to operations.

Agent based building simulation also allows for heavy use and reuse ofdesign inputs, as well as for ease of commissioning (e.g. such as byeliminating the need for explicit point binding.) Agents, such as spaceagents, equipment agents, and control agents may be used, and may allowfor goal-oriented optimization within the BMS. For example, each of theagents may communicate with each other via communication channels toachieve a particular optimization for a particular zone or space.Further, agents can be used to allow for agile deployment of newfeatures (e.g. via the agents) when the BMS is in operations mode. Theagents can be run on different devices within the system (e.g. cloud,server, controller, smartboards, etc.) and can allow for systemscalability without complexity (e.g. via agents forming buildingblocks.) Additionally, cloud replicas or virtual simulations of abuilding can allow for analytics and machine learning to be performed.

Building Management System and HVAC System

Referring now to FIGS. 1-4, an exemplary building management system(BMS) and HVAC system in which the systems and methods of the presentdisclosure can be implemented are shown, according to an exemplaryembodiment. Referring particularly to FIG. 1, a perspective view of abuilding 10 is shown. Building 10 is served by a BMS. A BMS is, ingeneral, a system of devices configured to control, monitor, and manageequipment in or around a building or building area. A BMS can include,for example, a HVAC system, a security system, a lighting system, a firealerting system, any other system that is capable of managing buildingfunctions or devices, or any combination thereof.

The BMS that serves building 10 includes an HVAC system 100. HVAC system100 can include a plurality of HVAC devices (e.g., heaters, chillers,air handling units, pumps, fans, thermal energy storage, etc.)configured to provide heating, cooling, ventilation, or other servicesfor building 10. For example, HVAC system 100 is shown to include awaterside system 120 and an airside system 130. Waterside system 120 canprovide a heated or chilled fluid to an air handling unit of airsidesystem 130. Airside system 130 can use the heated or chilled fluid toheat or cool an airflow provided to building 10. An exemplary watersidesystem and airside system which can be used in HVAC system 100 aredescribed in greater detail with reference to FIGS. 2-3.

HVAC system 100 is shown to include a chiller 102, a boiler 104, and arooftop air handling unit (AHU) 106. Waterside system 120 can use boiler104 and chiller 102 to heat or cool a working fluid (e.g., water,glycol, etc.) and can circulate the working fluid to AHU 106. In variousembodiments, the HVAC devices of waterside system 120 can be located inor around building 10 (as shown in FIG. 1) or at an offsite locationsuch as a central plant (e.g., a chiller plant, a steam plant, a heatplant, etc.). The working fluid can be heated in boiler 104 or cooled inchiller 102, depending on whether heating or cooling is required inbuilding 10. Boiler 104 can add heat to the circulated fluid, forexample, by burning a combustible material (e.g., natural gas) or usingan electric heating element. Chiller 102 can place the circulated fluidin a heat exchange relationship with another fluid (e.g., a refrigerant)in a heat exchanger (e.g., an evaporator) to absorb heat from thecirculated fluid. The working fluid from chiller 102 and/or boiler 104can be transported to AHU 106 via piping 108.

AHU 106 can place the working fluid in a heat exchange relationship withan airflow passing through AHU 106 (e.g., via one or more stages ofcooling coils and/or heating coils). The airflow can be, for example,outside air, return air from within building 10, or a combinationthereof. AHU 106 can transfer heat between the airflow and the workingfluid to provide heating or cooling for the airflow. For example, AHU106 can include one or more fans or blowers configured to pass theairflow over or through a heat exchanger containing the working fluid.The working fluid can then return to chiller 102 or boiler 104 viapiping 110.

Airside system 130 can deliver the airflow supplied by AHU 106 (i.e.,the supply airflow) to building 10 via air supply ducts 112 and canprovide return air from building 10 to AHU 106 via air return ducts 114.In some embodiments, airside system 130 includes multiple variable airvolume (VAV) units 116. For example, airside system 130 is shown toinclude a separate VAV unit 116 on each floor or zone of building 10.VAV units 116 can include dampers or other flow control elements thatcan be operated to control an amount of the supply airflow provided toindividual zones of building 10. In other embodiments, airside system130 delivers the supply airflow into one or more zones of building 10(e.g., via supply ducts 112) without using intermediate VAV units 116 orother flow control elements. AHU 106 can include various sensors (e.g.,temperature sensors, pressure sensors, etc.) configured to measureattributes of the supply airflow. AHU 106 can receive input from sensorslocated within AHU 106 and/or within the building zone and can adjustthe flow rate, temperature, or other attributes of the supply airflowthrough AHU 106 to achieve set-point conditions for the building zone.

Referring now to FIG. 2, a block diagram of a waterside system 200 isshown, according to an exemplary embodiment. In various embodiments,waterside system 200 can supplement or replace waterside system 120 inHVAC system 100 or can be implemented separate from HVAC system 100.When implemented in HVAC system 100, waterside system 200 can include asubset of the HVAC devices in HVAC system 100 (e.g., boiler 104, chiller102, pumps, valves, etc.) and can operate to supply a heated or chilledfluid to AHU 106. The HVAC devices of waterside system 200 can belocated within building 10 (e.g., as components of waterside system 120)or at an offsite location such as a central plant.

In FIG. 2, waterside system 200 is shown as a central plant having aplurality of subplants 202-212. Subplants 202-212 are shown to include aheater subplant 202, a heat recovery chiller subplant 204, a chillersubplant 206, a cooling tower subplant 208, a hot thermal energy storage(TES) subplant 210, and a cold thermal energy storage (TES) subplant212. Subplants 202-212 consume resources (e.g., water, natural gas,electricity, etc.) from utilities to serve the thermal energy loads(e.g., hot water, cold water, heating, cooling, etc.) of a building orcampus. For example, heater subplant 202 can be configured to heat waterin a hot water loop 214 that circulates the hot water between heatersubplant 202 and building 10. Chiller subplant 206 can be configured tochill water in a cold water loop 216 that circulates the cold waterbetween chiller subplant 206 building 10. Heat recovery chiller subplant204 can be configured to transfer heat from cold water loop 216 to hotwater loop 214 to provide additional heating for the hot water andadditional cooling for the cold water. Condenser water loop 218 canabsorb heat from the cold water in chiller subplant 206 and reject theabsorbed heat in cooling tower subplant 208 or transfer the absorbedheat to hot water loop 214. Hot TES subplant 210 and cold TES subplant212 can store hot and cold thermal energy, respectively, for subsequentuse.

Hot water loop 214 and cold water loop 216 can deliver the heated and/orchilled water to air handlers located on the rooftop of building 10(e.g., AHU 106) or to individual floors or zones of building 10 (e.g.,VAV units 116). The air handlers push air past heat exchangers (e.g.,heating coils or cooling coils) through which the water flows to provideheating or cooling for the air. The heated or cooled air can bedelivered to individual zones of building 10 to serve the thermal energyloads of building 10. The water then returns to subplants 202-212 toreceive further heating or cooling.

Although subplants 202-212 are shown and described as heating andcooling water for circulation to a building, it is understood that anyother type of working fluid (e.g., glycol, CO2, etc.) can be used inplace of or in addition to water to serve the thermal energy loads. Inother embodiments, subplants 202-212 can provide heating and/or coolingdirectly to the building or campus without requiring an intermediateheat transfer fluid. These and other variations to waterside system 200are within the teachings of the present invention.

Each of subplants 202-212 can include a variety of equipment configuredto facilitate the functions of the subplant. For example, heatersubplant 202 is shown to include a plurality of heating elements 220(e.g., boilers, electric heaters, etc.) configured to add heat to thehot water in hot water loop 214. Heater subplant 202 is also shown toinclude several pumps 222 and 224 configured to circulate the hot waterin hot water loop 214 and to control the flow rate of the hot waterthrough individual heating elements 220. Chiller subplant 206 is shownto include a plurality of chillers 232 configured to remove heat fromthe cold water in cold water loop 216. Chiller subplant 206 is alsoshown to include several pumps 234 and 236 configured to circulate thecold water in cold water loop 216 and to control the flow rate of thecold water through individual chillers 232.

Heat recovery chiller subplant 204 is shown to include a plurality ofheat recovery heat exchangers 226 (e.g., refrigeration circuits)configured to transfer heat from cold water loop 216 to hot water loop214. Heat recovery chiller subplant 204 is also shown to include severalpumps 228 and 230 configured to circulate the hot water and/or coldwater through heat recovery heat exchangers 226 and to control the flowrate of the water through individual heat recovery heat exchangers 226.Cooling tower subplant 208 is shown to include a plurality of coolingtowers 238 configured to remove heat from the condenser water incondenser water loop 218. Cooling tower subplant 208 is also shown toinclude several pumps 240 configured to circulate the condenser water incondenser water loop 218 and to control the flow rate of the condenserwater through individual cooling towers 238.

Hot TES subplant 210 is shown to include a hot TES tank 242 configuredto store the hot water for later use. Hot TES subplant 210 can alsoinclude one or more pumps or valves configured to control the flow rateof the hot water into or out of hot TES tank 242. Cold TES subplant 212is shown to include cold TES tanks 244 configured to store the coldwater for later use. Cold TES subplant 212 can also include one or morepumps or valves configured to control the flow rate of the cold waterinto or out of cold TES tanks 244.

In some embodiments, one or more of the pumps in waterside system 200(e.g., pumps 222, 224, 228, 230, 234, 236, and/or 240) or pipelines inwaterside system 200 include an isolation valve associated therewith.Isolation valves can be integrated with the pumps or positioned upstreamor downstream of the pumps to control the fluid flows in watersidesystem 200. In various embodiments, waterside system 200 can includemore, fewer, or different types of devices and/or subplants based on theparticular configuration of waterside system 200 and the types of loadsserved by waterside system 200.

Referring now to FIG. 3, a block diagram of an airside system 300 isshown, according to an exemplary embodiment. In various embodiments,airside system 300 can supplement or replace airside system 130 in HVACsystem 100 or can be implemented separate from HVAC system 100. Whenimplemented in HVAC system 100, airside system 300 can include a subsetof the HVAC devices in HVAC system 100 (e.g., AHU 106, VAV units 116,ducts 112-114, fans, dampers, etc.) and can be located in or aroundbuilding 10. Airside system 300 can operate to heat or cool an airflowprovided to building 10 using a heated or chilled fluid provided bywaterside system 200.

In FIG. 3, airside system 300 is shown to include an economizer-type airhandling unit (AHU) 302. Economizer-type AHUs vary the amount of outsideair and return air used by the air handling unit for heating or cooling.For example, AHU 302 can receive return air 304 from building zone 306via return air duct 308 and can deliver supply air 310 to building zone306 via supply air duct 312. In some embodiments, AHU 302 is a rooftopunit located on the roof of building 10 (e.g., AHU 106 as shown inFIG. 1) or otherwise positioned to receive return air 304 and outsideair 314. AHU 302 can be configured to operate exhaust air damper 316,mixing damper 318, and outside air damper 320 to control an amount ofoutside air 314 and return air 304 that combine to form supply air 310.Any return air 304 that does not pass through mixing damper 318 can beexhausted from AHU 302 through exhaust damper 316 as exhaust air 322.

Each of dampers 316-320 can be operated by an actuator. For example,exhaust air damper 316 can be operated by actuator 324, mixing damper318 can be operated by actuator 326, and outside air damper 320 can beoperated by actuator 328. Actuators 324-328 can communicate with an AHUcontroller 330 via a communications link 332. Actuators 324-328 canreceive control signals from AHU controller 330 and can provide feedbacksignals to AHU controller 330. Feedback signals can include, forexample, an indication of a current actuator or damper position, anamount of torque or force exerted by the actuator, diagnosticinformation (e.g., results of diagnostic tests performed by actuators324-328), status information, commissioning information, configurationsettings, calibration data, and/or other types of information or datathat can be collected, stored, or used by actuators 324-328. AHUcontroller 330 can be an economizer controller configured to use one ormore control algorithms (e.g., state-based algorithms, extremum seekingcontrol (ESC) algorithms, proportional-integral (PI) control algorithms,proportional-integral-derivative (PID) control algorithms, modelpredictive control (MPC) algorithms, feedback control algorithms, etc.)to control actuators 324-328.

Still referring to FIG. 3, AHU 302 is shown to include a cooling coil334, a heating coil 336, and a fan 338 positioned within supply air duct312. Fan 338 can be configured to force supply air 310 through coolingcoil 334 and/or heating coil 336 and provide supply air 310 to buildingzone 306. AHU controller 330 can communicate with fan 338 viacommunications link 340 to control a flow rate of supply air 310. Insome embodiments, AHU controller 330 controls an amount of heating orcooling applied to supply air 310 by modulating a speed of fan 338.

Cooling coil 334 can receive a chilled fluid from waterside system 200(e.g., from cold water loop 216) via piping 342 and can return thechilled fluid to waterside system 200 via piping 344. Valve 346 can bepositioned along piping 342 or piping 344 to control a flow rate of thechilled fluid through cooling coil 334. In some embodiments, coolingcoil 334 includes multiple stages of cooling coils that can beindependently activated and deactivated (e.g., by AHU controller 330, byBMS controller 366, etc.) to modulate an amount of cooling applied tosupply air 310.

Heating coil 336 can receive a heated fluid from waterside system 200(e.g., from hot water loop 214) via piping 348 and can return the heatedfluid to waterside system 200 via piping 350. Valve 352 can bepositioned along piping 348 or piping 350 to control a flow rate of theheated fluid through heating coil 336. In some embodiments, heating coil336 includes multiple stages of heating coils that can be independentlyactivated and deactivated (e.g., by AHU controller 330, by BMScontroller 366, etc.) to modulate an amount of heating applied to supplyair 310.

Each of valves 346 and 352 can be controlled by an actuator. Forexample, valve 346 can be controlled by actuator 354 and valve 352 canbe controlled by actuator 356. Actuators 354-356 can communicate withAHU controller 330 via communications links 358-360. Actuators 354-356can receive control signals from AHU controller 330 and can providefeedback signals to controller 330. In some embodiments, AHU controller330 receives a measurement of the supply air temperature from atemperature sensor 362 positioned in supply air duct 312 (e.g.,downstream of cooling coil 334 and/or heating coil 336). AHU controller330 can also receive a measurement of the temperature of building zone306 from a temperature sensor 364 located in building zone 306.

In some embodiments, AHU controller 330 operates valves 346 and 352 viaactuators 354-356 to modulate an amount of heating or cooling providedto supply air 310 (e.g., to achieve a set-point temperature for supplyair 310 or to maintain the temperature of supply air 310 within aset-point temperature range). The positions of valves 346 and 352 affectthe amount of heating or cooling provided to supply air 310 by coolingcoil 334 or heating coil 336 and may correlate with the amount of energyconsumed to achieve a desired supply air temperature. AHU controller 330can control the temperature of supply air 310 and/or building zone 306by activating or deactivating coils 334-336, adjusting a speed of fan338, or a combination of thereof.

Still referring to FIG. 3, airside system 300 is shown to include abuilding management system (BMS) controller 366 and a client device 368.BMS controller 366 can include one or more computer systems (e.g.,servers, supervisory controllers, subsystem controllers, etc.) thatserve as system level controllers, application or data servers, headnodes, or master controllers for airside system 300, waterside system200, HVAC system 100, and/or other controllable systems that servebuilding 10. BMS controller 366 can communicate with multiple downstreambuilding systems or subsystems (e.g., HVAC system 100, a securitysystem, a lighting system, waterside system 200, etc.) via acommunications link 370 according to like or disparate protocols (e.g.,LON, BACnet, etc.). In various embodiments, AHU controller 330 and BMScontroller 366 can be separate (as shown in FIG. 3) or integrated. In anintegrated implementation, AHU controller 330 can be a software moduleconfigured for execution by a processor of BMS controller 366.

In some embodiments, AHU controller 330 receives information from BMScontroller 366 (e.g., commands, setpoints, operating boundaries, etc.)and provides information to BMS controller 366 (e.g., temperaturemeasurements, valve or actuator positions, operating statuses,diagnostics, etc.). For example, AHU controller 330 can provide BMScontroller 366 with temperature measurements from temperature sensors362-364, equipment on/off states, equipment operating capacities, and/orany other information that can be used by BMS controller 366 to monitoror control a variable state or condition within building zone 306.

Client device 368 can include one or more human-machine interfaces orclient interfaces (e.g., graphical user interfaces, reportinginterfaces, text-based computer interfaces, client-facing web services,web servers that provide pages to web clients, etc.) for controlling,viewing, or otherwise interacting with HVAC system 100, its subsystems,and/or devices. Client device 368 can be a computer workstation, aclient terminal, a remote or local interface, or any other type of userinterface device. Client device 368 can be a stationary terminal or amobile device. For example, client device 368 can be a desktop computer,a computer server with a user interface, a laptop computer, a tablet, asmartphone, a PDA, or any other type of mobile or non-mobile device.Client device 368 can communicate with BMS controller 366 and/or AHUcontroller 330 via communications link 372.

Referring now to FIG. 4, a block diagram of a building management system(BMS) 400 is shown, according to an exemplary embodiment. BMS 400 can beimplemented in building 10 to automatically monitor and control variousbuilding functions. BMS 400 is shown to include BMS controller 366 and aplurality of building subsystems 428. Building subsystems 428 are shownto include a building electrical subsystem 434, an informationcommunication technology (ICT) subsystem 436, a security subsystem 438,a HVAC subsystem 440, a lighting subsystem 442, a lift/escalatorssubsystem 432, and a fire safety subsystem 430. In various embodiments,building subsystems 428 can include fewer, additional, or alternativesubsystems. For example, building subsystems 428 can also oralternatively include a refrigeration subsystem, an advertising orsignage subsystem, a cooking subsystem, a vending subsystem, a printeror copy service subsystem, or any other type of building subsystem thatuses controllable equipment and/or sensors to monitor or controlbuilding 10. In some embodiments, building subsystems 428 includewaterside system 200 and/or airside system 300, as described withreference to FIGS. 2-3.

Each of building subsystems 428 can include any number of devices,controllers, and connections for completing its individual functions andcontrol activities. HVAC subsystem 440 can include many of the samecomponents as HVAC system 100, as described with reference to FIGS. 1-3.For example, HVAC subsystem 440 can include a chiller, a boiler, anynumber of air handling units, economizers, field controllers,supervisory controllers, actuators, temperature sensors, and otherdevices for controlling the temperature, humidity, airflow, or othervariable conditions within building 10. Lighting subsystem 442 caninclude any number of light fixtures, ballasts, lighting sensors,dimmers, or other devices configured to controllably adjust the amountof light provided to a building space. Security subsystem 438 caninclude occupancy sensors, video surveillance cameras, digital videorecorders, video processing servers, intrusion detection devices, accesscontrol devices (e.g., card access, etc.) and servers, or othersecurity-related devices.

Still referring to FIG. 4, BMS controller 366 is shown to include acommunications interface 407 and a BMS interface 409. Interface 407 canfacilitate communications between BMS controller 366 and externalapplications (e.g., monitoring and reporting applications 422,enterprise control applications 426, remote systems and applications444, applications residing on client devices 448, etc.) for allowinguser control, monitoring, and adjustment to BMS controller 366 and/orsubsystems 428. Interface 407 can also facilitate communications betweenBMS controller 366 and client devices 448. BMS interface 409 canfacilitate communications between BMS controller 366 and buildingsubsystems 428 (e.g., HVAC, lighting security, lifts, powerdistribution, business, etc.).

Interfaces 407, 409 can be or include wired or wireless communicationsinterfaces (e.g., jacks, antennas, transmitters, receivers,transceivers, wire terminals, etc.) for conducting data communicationswith building subsystems 428 or other external systems or devices. Invarious embodiments, communications via interfaces 407, 409 can bedirect (e.g., local wired or wireless communications) or via acommunications network 446 (e.g., a WAN, the Internet, a cellularnetwork, etc.). For example, interfaces 407, 409 can include an Ethernetcard and port for sending and receiving data via an Ethernet-basedcommunications link or network. In another example, interfaces 407, 409can include a Wi-Fi transceiver for communicating via a wirelesscommunications network. In another example, one or both of interfaces407, 409 can include cellular or mobile phone communicationstransceivers. In one embodiment, communications interface 407 is a powerline communications interface and BMS interface 409 is an Ethernetinterface. In other embodiments, both the communications interface 407and the BMS interface 409 are Ethernet interfaces or are the sameEthernet interface.

Still referring to FIG. 4, BMS controller 366 is shown to include aprocessing circuit 404 including a processor 406 and memory 408.Processing circuit 404 can be communicably connected to BMS interface409 and/or communications interface 407 such that processing circuit 404and the various components thereof can send and receive data viainterfaces 407, 409. Processor 406 can be implemented as a generalpurpose processor, an application specific integrated circuit (ASIC),one or more field programmable gate arrays (FPGAs), a group ofprocessing components, or other suitable electronic processingcomponents.

Memory 408 (e.g., memory, memory unit, storage device, etc.) can includeone or more devices (e.g., RAM, ROM, Flash memory, hard disk storage,etc.) for storing data and/or computer code for completing orfacilitating the various processes, layers and modules described in thepresent application. Memory 408 can be or include volatile memory ornon-volatile memory. Memory 408 can include database components, objectcode components, script components, or any other type of informationstructure for supporting the various activities and informationstructures described in the present application. According to anexemplary embodiment, memory 408 is communicably connected to processor406 via processing circuit 404 and includes computer code for executing(e.g., by processing circuit 404 and/or processor 406) one or moreprocesses described herein.

In some embodiments, BMS controller 366 is implemented within a singlecomputer (e.g., one server, one housing, etc.). In various otherembodiments BMS controller 366 can be distributed across multipleservers or computers (e.g., that can exist in distributed locations).Further, while FIG. 4 shows applications 422 and 426 as existing outsideof BMS controller 366, in some embodiments, applications 422 and 426 canbe hosted within BMS controller 366 (e.g., within memory 408).

Still referring to FIG. 4, memory 408 is shown to include an enterpriseintegration layer 410, an automated measurement and validation (AM & V)layer 412, a demand response (DR) layer 414, a fault detection anddiagnostics (FDD) layer 416, an integrated control layer 418, and abuilding subsystem integration later 420. Layers 410-420 can beconfigured to receive inputs from building subsystems 428 and other datasources, determine optimal control actions for building subsystems 428based on the inputs, generate control signals based on the optimalcontrol actions, and provide the generated control signals to buildingsubsystems 428. The following paragraphs describe some of the generalfunctions performed by each of layers 410-420 in BMS 400.

Enterprise integration layer 410 can be configured to serve clients orlocal applications with information and services to support a variety ofenterprise-level applications. For example, enterprise controlapplications 426 can be configured to provide subsystem-spanning controlto a graphical user interface (GUI) or to any number of enterprise-levelbusiness applications (e.g., accounting systems, user identificationsystems, etc.). Enterprise control applications 426 can also oralternatively be configured to provide configuration GUIs forconfiguring BMS controller 366. In yet other embodiments, enterprisecontrol applications 426 can work with layers 410-420 to optimizebuilding performance (e.g., efficiency, energy use, comfort, or safety)based on inputs received at interface 407 and/or BMS interface 409.

Building subsystem integration layer 420 can be configured to managecommunications between BMS controller 366 and building subsystems 428.For example, building subsystem integration layer 420 can receive sensordata and input signals from building subsystems 428 and provide outputdata and control signals to building subsystems 428. Building subsystemintegration layer 420 can also be configured to manage communicationsbetween building subsystems 428. Building subsystem integration layer420 translate communications (e.g., sensor data, input signals, outputsignals, etc.) across a plurality of multi-vendor/multi-protocolsystems.

Demand response layer 414 can be configured to optimize resource usage(e.g., electricity use, natural gas use, water use, etc.) and/or themonetary cost of such resource usage in response to satisfy the demandof building 10. The optimization can be based on time-of-use prices,curtailment signals, energy availability, or other data received fromutility providers, distributed energy generation systems 424, fromenergy storage 427 (e.g., hot TES 242, cold TES 244, etc.), or fromother sources. Demand response layer 414 can receive inputs from otherlayers of BMS controller 366 (e.g., building subsystem integration layer420, integrated control layer 418, etc.). The inputs received from otherlayers can include environmental or sensor inputs such as temperature,carbon dioxide levels, relative humidity levels, air quality sensoroutputs, occupancy sensor outputs, room schedules, and the like. Theinputs can also include inputs such as electrical use (e.g., expressedin kWh), thermal load measurements, pricing information, projectedpricing, smoothed pricing, curtailment signals from utilities, and thelike.

According to an exemplary embodiment, demand response layer 414 includescontrol logic for responding to the data and signals it receives. Theseresponses can include communicating with the control algorithms inintegrated control layer 418, changing control strategies, changingsetpoints, or activating/deactivating building equipment or subsystemsin a controlled manner. Demand response layer 414 can also includecontrol logic configured to determine when to utilize stored energy. Forexample, demand response layer 414 can determine to begin using energyfrom energy storage 427 just prior to the beginning of a peak use hour.

In some embodiments, demand response layer 414 includes a control moduleconfigured to actively initiate control actions (e.g., automaticallychanging setpoints) which minimize energy costs based on one or moreinputs representative of or based on demand (e.g., price, a curtailmentsignal, a demand level, etc.). In some embodiments, demand responselayer 414 uses equipment models to determine an optimal set of controlactions. The equipment models can include, for example, thermodynamicmodels describing the inputs, outputs, and/or functions performed byvarious sets of building equipment. Equipment models can representcollections of building equipment (e.g., subplants, chiller arrays,etc.) or individual devices (e.g., individual chillers, heaters, pumps,etc.).

Demand response layer 414 can further include or draw upon one or moredemand response policy definitions (e.g., databases, XML, files, etc.).The policy definitions can be edited or adjusted by a user (e.g., via agraphical user interface) so that the control actions initiated inresponse to demand inputs can be tailored for the user's application,desired comfort level, particular building equipment, or based on otherconcerns. For example, the demand response policy definitions canspecify which equipment can be turned on or off in response toparticular demand inputs, how long a system or piece of equipment shouldbe turned off, what setpoints can be changed, what the allowable setpoint adjustment range is, how long to hold a high demand set-pointbefore returning to a normally scheduled set-point, how close toapproach capacity limits, which equipment modes to utilize, the energytransfer rates (e.g., the maximum rate, an alarm rate, other rateboundary information, etc.) into and out of energy storage devices(e.g., thermal storage tanks, battery banks, etc.), and when to dispatchon-site generation of energy (e.g., via fuel cells, a motor generatorset, etc.).

Integrated control layer 418 can be configured to use the data input oroutput of building subsystem integration layer 420 and/or demandresponse later 414 to make control decisions. Due to the subsystemintegration provided by building subsystem integration layer 420,integrated control layer 418 can integrate control activities of thesubsystems 428 such that the subsystems 428 behave as a singleintegrated supersystem. In an exemplary embodiment, integrated controllayer 418 includes control logic that uses inputs and outputs from aplurality of building subsystems to provide greater comfort and energysavings relative to the comfort and energy savings that separatesubsystems could provide alone. For example, integrated control layer418 can be configured to use an input from a first subsystem to make anenergy-saving control decision for a second subsystem. Results of thesedecisions can be communicated back to building subsystem integrationlayer 420.

Integrated control layer 418 is shown to be logically below demandresponse layer 414. Integrated control layer 418 can be configured toenhance the effectiveness of demand response layer 414 by enablingbuilding subsystems 428 and their respective control loops to becontrolled in coordination with demand response layer 414. Thisconfiguration may advantageously reduce disruptive demand responsebehavior relative to conventional systems. For example, integratedcontrol layer 418 can be configured to assure that a demandresponse-driven upward adjustment to the set-point for chilled watertemperature (or another component that directly or indirectly affectstemperature) does not result in an increase in fan energy (or otherenergy used to cool a space) that would result in greater total buildingenergy use than was saved at the chiller.

Integrated control layer 418 can be configured to provide feedback todemand response layer 414 so that demand response layer 414 checks thatconstraints (e.g., temperature, lighting levels, etc.) are properlymaintained even while demanded load shedding is in progress. Theconstraints can also include set-point or sensed boundaries relating tosafety, equipment operating limits and performance, comfort, fire codes,electrical codes, energy codes, and the like. Integrated control layer418 is also logically below fault detection and diagnostics layer 416and automated measurement and validation layer 412. Integrated controllayer 418 can be configured to provide calculated inputs (e.g.,aggregations) to these higher levels based on outputs from more than onebuilding subsystem.

Automated measurement and validation (AM & V) layer 412 can beconfigured to verify that control strategies commanded by integratedcontrol layer 418 or demand response layer 414 are working properly(e.g., using data aggregated by AM & V layer 412, integrated controllayer 418, building subsystem integration layer 420, FDD layer 416, orotherwise). The calculations made by AM & V layer 412 can be based onbuilding system energy models and/or equipment models for individual BMSdevices or subsystems. For example, AM & V layer 412 can compare amodel-predicted output with an actual output from building subsystems428 to determine an accuracy of the model.

Fault detection and diagnostics (FDD) layer 416 can be configured toprovide on-going fault detection for building subsystems 428, buildingsubsystem devices (i.e., building equipment), and control algorithmsused by demand response layer 414 and integrated control layer 418. FDDlayer 416 can receive data inputs from integrated control layer 418,directly from one or more building subsystems or devices, or fromanother data source. FDD layer 416 can automatically diagnose andrespond to detected faults. The responses to detected or diagnosedfaults can include providing an alert message to a user, a maintenancescheduling system, or a control algorithm configured to attempt torepair the fault or to work-around the fault.

FDD layer 416 can be configured to output a specific identification ofthe faulty component or cause of the fault (e.g., loose damper linkage)using detailed subsystem inputs available at building subsystemintegration layer 420. In other exemplary embodiments, FDD layer 416 isconfigured to provide “fault” events to integrated control layer 418which executes control strategies and policies in response to thereceived fault events. According to an exemplary embodiment, FDD layer416 (or a policy executed by an integrated control engine or businessrules engine) can shut-down systems or direct control activities aroundfaulty devices or systems to reduce energy waste, extend equipment life,or assure proper control response.

FDD layer 416 can be configured to store or access a variety ofdifferent system data stores (or data points for live data). FDD layer416 can use some content of the data stores to identify faults at theequipment level (e.g., specific chiller, specific AHU, specific terminalunit, etc.) and other content to identify faults at component orsubsystem levels. For example, building subsystems 428 can generatetemporal (i.e., time-series) data indicating the performance of BMS 400and the various components thereof. The data generated by buildingsubsystems 428 can include measured or calculated values that exhibitstatistical characteristics and provide information about how thecorresponding system or process (e.g., a temperature control process, aflow control process, etc.) is performing in terms of error from itsset-point. These processes can be examined by FDD layer 416 to exposewhen the system begins to degrade in performance and alert a user torepair the fault before it becomes more severe.

Adaptive Agent Based Control System

Referring now to F. The system 500 may be any of the BMS systemsdescribed above. Further, the system 500 may be a peer-to-peer (P2P)network, such as a Verisys system from Johnson Controls. The system 500may include a controller 502. The controller 502 may be a dedicatedcontroller within a BMS. In one embodiment, the controller 502 is acloud based server (e.g., an internet based server). For example, thecontroller 502 may be physically located in one or more server farms andaccessible via an internet connection. In some examples, the controllermay be a standalone device in a peer-to-peer (P2P) network, such as aVerisys system from Johnson Controls. The controller 502 may include aprocessing circuit 504 including an adaptive interaction manager 506.The processing circuit 504 may include a processor 508 and a memory 510.The processor 508 may be a general purpose or specific purposeprocessor, an application specific integrated circuit (ASIC), one ormore field programmable gate arrays (FPGAs), a group of processingcomponents, or other suitable processing components. The processor 508is configured to execute computer code or instructions stored in thememory 510 or received from other computer readable media (e.g., CDROM,network storage, a remote server, etc.).

The memory 510 may include one or more devices (e.g., memory units,memory devices, storage devices, etc.) for storing data and/or computercode for completing and/or facilitating the various processes describedin the present disclosure. The memory 510 may include random accessmemory (RAM), read-only memory (ROM), hard drive storage, temporarystorage, non-volatile memory, flash memory, optical memory, or any othersuitable memory for storing software objects and/or computerinstructions. The memory 510 may include database components, objectcode components, script components, or any other type of informationstructure for supporting the various activities and informationstructures described in the present disclosure. The memory 510 may becommunicably connected to the processor 508 via the processing circuit504 and may include computer code for executing (e.g., by the processor508) one or more processes described herein. When the processor 508executes instructions stored in the memory 510, the processor 508generally configures the processing circuit 504 to complete suchactivities.

The memory 510 may include the adaptive interaction manager 506, alearning engine 512, and an agent manager 514. The learning engine 512may be used to generate and access historical information, user feedbackinformation, etc. In one embodiment, the learning engine 512 may accessa database 516 via the processing circuit 504. The database 516 mayinclude data relating to one or more BMS's, such as building layouts,system schematics, device information, control schemes, environmentalratings, historical data, etc. In one embodiment, the database 516includes contextual information. The contextual information may includedictionaries, historical data, scripts, and/or other data forinterpreting contextual information. The database 516 may furtherinclude a knowledgebase, which may include previous commands, userresponses, generated outputs, device information, agent specificlearning, etc. The database 516 may further include one or moreinferences. The inferences may include contextual inferences, historicalinferences, etc. In some embodiments, the learning engine 512 mayprovide the inferences to the database 516. The learning engine 512 mayfurther update the inferences, as well as other data, of the database516 over time. The learning engine 512 may further access data withinthe database 516 to aid in the generation of agents, as will bediscussed below. The database 516 may further include one or moreuniversal truths associated with the system 500. In one embodiment, theuniversal truths may be associated with one or more BMS controllers ordevices within the system 500. In one embodiment, the universal truthsmay be arranged in a universal truth table, which may be populated withuniversal truths for a given system, such as system 500. Exampleuniversal truths may include a defined communication schemes between BMSdevices and/or controllers.

The agent manager 514 is further shown to include an agent scheduler 520and an agent generator 522. In some embodiments, the agent scheduler 520maintains a record of all agents previously generated and active withinthe system 500. Further the agent scheduler 520 may also maintain realtime data relating to which agents are currently active, and whichagents are not currently active. The agent scheduler may furthermaintain real time data relating to which device within the system 500 aparticular agent is currently associated with. For example, as shown inFIG. 5, agent ‘A’ 524 is associated with a BMS controller 526 within aBMS 525 of the system 500. The BMS 525 can be any combination of BMSdevices as described above in regards to FIGS. 1-4. Further, the BMS 525can be understood to be a residential system, such as a home controller.The BMS controller 526 may be any BMS controller, as described above inregards to FIGS. 1-4. Alternatively, the BMS controller 526 may be adedicated BMS interface device, such as an Athens Smart Hub device fromJohnson Controls. The agent scheduler 520 may, therefore, maintain arecord of the agent ‘A’ 524 being associated with the BMS controller526, as well as the current status of the agent ‘A’ 524.

The agent generator 522 may generate a number of agents, such as agent‘A’ 524, for use in the system 500. The agents, as described herein, maybe software applications that can run automated tasks (scripts). Forexample, the agents may be software applications that can read and/orwrite data to one or more devices of the system. In one embodiment, theagents may be able to generate their own software, and inject thesoftware into one or more devices that it is associated with. The agentsmay further be capable of communicating with other agents, as will bedescribed in more detail below, along with a more detailed descriptionof the agents generally. The agent generator 522 may generate an agentbased on information received from the adaptive interaction manager 506.In some embodiment, the agents are generated to perform a defined task.In other embodiments, the agents are generated to perform a defined setof tasks. In still further embodiments, the agents are generated havinga desired goal, and allowed to determine how to meet the desired goal.In some examples, a generalized framework can be provided to a generatedagent to provide constraints as to how the goal may be achieved. Infurther embodiments, the agent generator 522 may modify an existingagent. For example, the agent generator 522 may modify an existing agentto provide more functionality. In other examples, the agent generator522 may update the agent with additional information related to thedevice the agent is associated with, such as a new firmware (“FW”)update, or additional hardware (e.g. a new I/O board for a controller).

The agent generator 522 may communicate the generated agents to the BMS525 via a BMS interface 528. The BMS interface 528 may be a serialinterface, such as RS-232 or RS-485. In one embodiment, the BMSinterface 528 is a universal asynchronous receiver/transmitter (“UART”).In other examples, the BMS interface 528 may be a wireless interfacesuch as cellular, Wi-Fi, Zigbee, Bluetooth, RF, LoRa, etc. Additionally,the BMS interface 528 may include other wired interfaces such as USB,Firewire, Lightning Connectors, CAT5 (wired internet), etc. The agentgenerator 522 may further communicate the generated agents to the system500 via an adaptive interaction manager interface 530. The adaptiveinteraction manager interface 506 may allow the agent generator 522, aswell as the processing circuit 504 in general, to communicate with theadaptive interaction manager 506 via a corresponding processing circuitinterface 532. Similar to above, the adaptive interaction managerinterface 530 may be a serial interface, such as RS-232 or RS-485. Inone embodiment, the adaptive interaction manager interface 530 is a UARTinterface. In still other examples, the adaptive interaction managerinterface 530 may be a wireless interface such as cellular, Wi-Fi,Zigbee, Bluetooth, RF, LoRa, etc. Additionally, the adaptive interactionmanager interface 530 may include other wired interfaces such as USB,Firewire, Lightning Connectors, CAT5 (wired internet), etc.

In some embodiments, the adaptive interaction manager 506 providescommunication between one or more I/O devices 534, one or morecloud-based applications 518, the processing circuit 504, and one ormore devices, such as the BMS controller 526. The adaptive interactionmanager 506 is shown to interact with a user interface 536 forcommunicating with the one or more I/O devices 534. In one embodiment,the user interface 536 may be a wireless interface such as cellular (3G,4G, LTE, CDMA, etc.), Wi-Fi, Zigbee, Bluetooth, RF, LoRa, etc.Additionally, the user interface 536 may include other wired interfacessuch as USB, Firewire, Lightning Connectors, CAT5 (wired internet),UART, serial (RS-232, RS-485), etc. The I/O devices 534 may be anydevice capable of communicating to the adaptive interaction manager 506,as well as providing a device for a user 538 to interface with thesystem 500. Example I/O devices 534 may include personal computingdevices such as smart phones (iPhone, Android phone, Windows phone),tablet computers (iPad, Android Tablet, Windows Surface, etc.), laptopcomputers, and/or desktop computers. Example I/O devices may furtherinclude a stand-alone device such as an Amazon Echo, or even anon-mobile device such as a voice capable thermostat, or other dedicatedI/O devices.

The adaptive interaction manager 506 may communicate with thecloud-based applications 518 via a network interface 540. The networkinterface 540 may be an internet based interface, such as Wi-Fi, CAT5,cellular (3G, 4G, LTE, CDMA, etc.), etc. However, other interfaces, suchas Zigbee, Bluetooth, RF, LoRa, etc., are also considered. In oneembodiment, the adaptive interaction manager 506 may communicate withthe cloud-based applications 518 via one or more APIs 542. In oneembodiment, the APIs 542 are proprietary APIs for interfacing theadaptive interaction manager 506 with the cloud based applications 518.In one example, the APIs 542 can be web hosted APIs provided by a thirdparty provider, such as Amazon Cloud Services, Google, Apple, Microsoft,etc. In some embodiments, the APIs 542 interface with a proprietaryvoice recognition application, such as a voice recognition applicationfrom Johnson Controls. In other examples, the APIs 542 can interfacewith gesture recognition APIs, such as those from Johnson Controls.Further examples of possible APIs 542 can include enterprise resourceplanning (ERP), or other enterprise management software APIs forinterfacing with a company or facility enterprise system (e.g. SAP).Other possible APIs 542 may include e-mail and/or calendaring interfaceAPIs, for interfacing with an e-mail/calendaring system such asMicrosoft Outlook, Apple Mail, Google Gmail, Lotus Notes, etc.

In one embodiment, the APIs 542 interface with the cloud-basedapplications 518. The cloud based applications 518 may be supplied bythird parties. For example, the cloud based applications 518 may includevoice to text applications, such as Amazon Voice Services, Google Voice,Apple's Siri, or Microsoft's Cortana. The cloud based applications 518may further include gesture recognition applications such as those usedby Microsoft Kinect. Further, other cloud based applications 518 caninclude personal assistant applications such as Apple's Siri, andMicrosoft's Cortana. By utilizing one or more cloud based applicationson a remote server, the system 500 can leverage more sophisticated andpowerful contextual data processing technology than would be applicableto install on an individual server, system, or device. For example,cloud based voice recognition applications can provide as high as 95%natural voice recognition accuracy. In other embodiments, thecloud-based applications 518 may include a natural language processor519. The natural language processor 519 may be a voice to textapplication, such as those described above. In other embodiments, thenatural language processor 519 may be used to processes natural languagetext into computer executable commands. For example, the naturallanguage processor 519 may be able to analyze text provided to thesystem 500, such as via e-mail or text message, and process the naturallanguage text into a format readable by the controller 502. While thenatural language processor 519 is shown as part of the cloud-basedapplications 518, it is considered that the natural language processor519 may be separate from the cloud based applications 518, andcommunicate directly with the adaptive interaction manager 506. Infurther embodiments, the natural language processor 519 may beintegrated into the controller 502.

The adaptive interaction manager 506 may further be in communicationwith one or more systems or devices associated with a facility orbuilding. As shown in FIG. 5, example systems and devices can include aBMS controller 526. The adaptive interaction manager 506 may communicatewith the system via a system interface 544. The system interface 544 maybe a serial interface, such as RS-232 or RS-485. In one embodiment, thesystem interface 544 is a UART interface. In still other examples, thesystem interface 544 may be a wireless interface such as cellular,Wi-Fi, Zigbee, Bluetooth, RF, LoRa, etc. Additionally, the systeminterface 544 may include other wired interfaces such as USB, Firewire,Lightning Connectors, CAT5 (wired internet), etc. While FIG. 5 shows theadaptive interaction manager 506 communicating with a BMS controller 526of the system 500, the adaptive interaction manager 506 may communicatewith any suitable device associated with the BMS 525. For example, theadaptive interaction manager 506 may be able to interface with the BMScontroller 526, one or more intermediate devices 546, and/or one or morelocal device 548. Example intermediate devices may include devicecontrollers, sub-system controllers, RTU's, AHU's, etc. Example localdevices may include thermostats, valves, switches, actuators, etc. Inone embodiment, system interface 544 may communicate with the BMS 525via a network connection, such as a BACnet network connection. However,other networks, such as Ethernet, Local Area Network, etc., are alsoconsidered.

The adaptive interaction manager 506 may further interact with othersystems associated with the BMS 525. Example system may include ane-mail calendaring server 550, a security system 552, etc. Via the BMS525, the e-mail calendaring server 550, the security system 552, and/orother systems may all provide data to the adaptive interaction manager506, which can process the information, as will be described in moredetail below. In one embodiment, the e-mail calendaring server 550, thesecurity system 552, and/or other systems may provide contextual data tothe adaptive interaction manager 506. In one embodiment, the adaptiveinteraction manager 506, via the system interface 544, communicates withthe one or more systems or devices using one or more networkconnections. For example, the network connections may include a wiredconnection to the internet. However, other network connections arecontemplated such as wireless connections, for example, such ascellular, Wi-Fi, Zigbee, Bluetooth, RF, LoRa, etc. Additionally, othernetwork connections such as serial connections (RS-485, RS-232, USB), orother connections such as Firewire, Lightning Connectors, etc. may beused.

The e-mail/calendaring server 550 may be a third partye-mail/calendaring server, such as a Microsoft Exchange server. In oneembodiment, the e-mail/calendaring server 550 processes the calendarsand schedules for the employees of a facility, as well as for physicalareas of the facility. For example, the e-mail/calendaring server 550may processes scheduling for conference/meeting rooms, as well ascertain technology such as projectors, video conference equipment, etc.In one embodiment, the e-mail/calendaring server 550 providesinformation such as schedules to the adaptive interaction manager 506.Further, the e-mail/calendaring server 550 may allow access to e-mailsby one or more cloud-based application 518 such as the personalassistant applications described above. The personal assistantapplications may be able to extract contextual information from the dataprovided by the e-mail/calendaring server 550 and provide the contextualinformation to the adaptive interaction manager 506 via an API 542.

The security system 552 may include multiple elements associated with afacility or building security system. For example, the security system552 can include multiple devices such as cameras, microphones, motiondetectors, thermal sensors, access devices (RFID locks, biometric locks,etc.), entry logs, etc. In one embodiment, the security system 552provides data to the adaptive interaction manager 506. The data mayinclude occupancy data provided by the motion detectors and/or thermalsensors. Further, the data may include video and/or digital imagesprovided by the cameras. In one embodiment, the digital images may beprovided to the cloud-based application 518 for processing via theadaptive interaction manager 506. For example, the cloud-basedapplication 518 may be a gesture recognition application, such asMicrosoft Kinect.

Turning now to FIG. 6, a block diagram showing a detailed view of thelearning engine 512 is shown, according to some embodiments. Thelearning engine may include a number of software modules 600. Thesoftware modules are shown to include a correlation module 602, astatistical analysis module 604, a knowledgebase interface module 606, amachine learning interface 612, a model predictive engine 614, atest-observe learning engine, and a model free optimization learningengine 618. The learning engine 512 may further include a feedbackdatabase 612 and a cloud-based services interface 614. The correlationmodule 602 may contain computer code executable by the processor 508 ofthe processing circuit 504 for correlating received data to generatecorrelated learning data. For example, the correlation module 602 maycorrelate an increase in temperature of a room at a certain time of day,with a request to lower the temperature in the room. The correlationmodule 602 may therefore generate correlated learning data that mayanticipate the request to lower the temperature at the above time, andprovide information to one or more agents (as discussed below), whichwill allow the agents to lower the temperature prior to the request tolower the temperature being provided to the BMS. The correlated learningdata may be used by one or more agents associated with one or more BMSdevices, controllers, or functions, as described above.

The statistical analysis module 604 may contain computer code executableby the processor 508 of the processing circuit 504 for providingstatistical analysis of data received from the BMS. For example, thelearning module may statistically analyze user actions, data trends,operating data, feedback data, etc., to generate statistical learningdata. For example, the statistical analysis module 604 may analyzeenergy cost data over a period of time, and generate statisticallearning data to anticipate when energy cost will be highest, which maybe used to suggest energy conservation methods to a user via one or moreagents. Further, where energy storage devices are present in the BMS,the statistical analysis module 604 may be used to predict when the besttimes for charging and discharging the energy storage devices may be,which may be pushed to one or more agents in the BMS.

The knowledgebase interface module 606 may provide access to the datastored in a knowledgebase, such as that stored in database 516,described above. This can allow the correlation module 602 and thestatistical analysis module 604 to access data stored in one or moreknowledgebases associated with the system 500 via the knowledgebaseinterface module 606. In some examples, the feedback database 612 mayalso be able to access one or more knowledgebases associated with thesystem 500. In some embodiments, one or more of the correlation module602, the statistical analysis module 604, the machine learning module612, the model predictive engine 614, the test-observe learning engine616, and the model free optimization learning engine 618 may be able towrite data to the one or more knowledgebases of the system 500 via theknowledgebase interface module 606. The cloud-based services interface614 may allow the learning engine 512 to interface with one or morecloud applications, such as cloud-based application 518 of system 500.

The machine learning module 612 may provide a machine learning engine toperform machine learning based on data received from the BMS 500 and/orthe database 516. In some embodiments, machine learning module 612 mayreceive data from multiple buildings (e.g., multiple BMSs) and learnfrom the data for various environmental conditions, equipmentconfigurations, setpoint schedules, and/or the like. For example, themachine learning module 612 may build a model from an existing set ofdata and analyze subsequently received data to generate data drivenpredictions or decisions. In one embodiment, the machine learning module612 may generate algorithms that can learn from the available data, andthat are not required to follow generally static program instructions.In one embodiment, the machine learning module 612 may perform machinelearning tasks using a supervised learning system. In other embodiment,the machine learning module 612 may perform machine learning tasks usingan unsupervised learning system or a reinforcement learning system.Further, the machine learning module 612 may utilize learning to learn,or developmental learning operations. In one embodiment, the machinelearning module 612 may utilize learning algorithms, including, but notlimited to: decision tree learning algorithms, association rule learningalgorithms, artificial neural networks algorithms, deep learningalgorithms, inductive logic programming algorithms, support vectormachines algorithms, clustering algorithms, Bayesian network algorithms,reinforcement learning algorithms, representation learning algorithms,similarity and metric learning algorithms, sparse dictionary learningalgorithms, and/or genetic algorithms. In some embodiments, the machinelearning module 612 may provide generated machine learning algorithms toone or more software agents to generate self-learning software (e.g.,intelligent) agents.

For example, intelligent agents (e.g., space agents, control agents,and/or equipment agents) may be configured to have states and behaviors,as well as be configured to operate as a computation unit. In someembodiments, intelligent agents may be configured to sense theirenvironments (e.g. the system or device for which they are installed),and evaluate potential operational options, as well as effect actionswithin the system or device. Intelligent agents may further beconfigured to function autonomously, and can further be goal oriented(e.g. can work towards achieving specific goals). The intelligent agentscan further be configured to interact with other agents and can work ina co-operative manner with other said agents. Additionally, intelligentagents can further learn from their behavior and the effect of thebehaviors on the environment over time based on machine learning. Forexample, the intelligent agents may be configured to perceive anenvironment with sensors or other inputs, and act on the perceivedenvironment with effectors. The intelligent agents may further beconfigured to act upon perceived information, experiences, or owndecisions. The methods of generating and/or configuring intelligentagents and other software agents will be described in more detail below.

In some embodiments, intelligent agents may transmit observation andaction data to the machine learning module 612 corresponding to its ownenvironment, sensors, or other inputs, as well as actions taken andresults achieved in response to such perceived environment. In thiscase, the machine learning module 612 may analyze the received data withdata received from other agents in the same or other buildings togenerate machine learning algorithms that can be utilized by the otheragents (e.g., intelligent agents). Taking reinforcement learning as anexample, machine learning module 612 can provide machine learningalgorithms to agents (e.g., intelligent agents) to take an action forany given state based on reinforcement learning. Reinforcement learningis a machine learning technique that determines a reward (e.g., pointsor a numerical value) for an action taken in any given state, where thegoal is to take actions that result in higher rewards. In this case, theintelligent agents can aggregate the data received from machine learningmodule 612 with its own observations and actions to determine a nextaction for a given state.

For example, referring to FIG. 7A, a block diagram of an agent forcontrolling the temperature of an environment is shown, according to anexemplary embodiment. As shown in FIG. 7A, an agent (e.g., anintelligent agent) 702 receives sensor data 704 from a sensor (e.g., atemperature sensor) 706 located in an environment (in this case a room)708. The agent 702 perceives a state of the environment 708 via thesensor 706, and acts on or affects the environment 708 via an effector(in this case an actuator) 710. In this example, the sensor 706indicates that a current state of the environment 708 (in this case aninitial state) is 68 degrees, as indicated by the sensor data 704. Basedon the current state of the environment 708, the agent 702 can performan action 712. For example, an initial action may be to open a damper by15 degrees (15D) for 15 minutes in order to change the temperature toachieve a specific goal or result (e.g., 70 degrees in this example).After the action is performed, the agent 702 receives a reward 714 basedon the result of the action 712. For example, referring to FIG. 7B, atable illustrating results for an initial loop through the machinelearning process of the agent in FIG. 7A is shown, according to anexemplary embodiment. The table includes a state (Temp_Before) 716, anaction (Damper_Position) 718 taken in response to the state, a result(Temp_After) 720 in response to the action 720, a number of observations(or loops) 722, and a probability 724 that the same action 718 will beselected as a next action for a same (or similar) state 716, which maybe calculated based on a reward (e.g., points) corresponding to thestate 716, action 718, and result 720.

FIG. 8A is a table illustrating results for a plurality of loops throughthe machine learning process of the agent in FIG. 7A, and FIG. 8B is ablock diagram of an agent for selecting a next action to control thetemperature of an environment, according to an exemplary embodiment. Asshown in FIG. 8A, as more actions are taken over time, the table iscontinuously updated for each opportunity 802 to calculate a probability724 for selecting a next action from among the actions 718 based on thestate 716, actions (e.g., previous actions) 718, and results 720. Forexample, referring to FIGS. 8A and 8B, for a current state 704 of 68degrees, the agent 702 can take one of two actions 712 with the goal ofincreasing the temperature to 70 degrees. The two actions 712 includeopening the damper by 15 degrees (15D) for 15 minutes or closing thedamper by 15 degrees for 15 minutes. From the table shown in FIG. 8A,either of these actions can result in the temperature of 70 degrees, asrepresented by the rows 804 and 806. However, there is a 51.4%probability that opening the damper by 15 degrees for 15 minutes is morelikely to result in the desired 70 degree temperature, whereas there isonly a 11% probability that closing the damper by 15 degrees for 15minutes will result in the desired 70 degree temperature. In thisexample, the agent 702 will choose to open the damper by 15 degrees for15 minutes based on the probability 724 (or reward), and will observethe results thereafter to update the table. However, it should beappreciated that the examples described with reference to FIGS. 7Athrough 8B are non-limiting examples, and in other embodiments, theremay be different or more variables for states and different or moretypes of actions depending on the application. For example, adding morevariables to the state (e.g., outdoor temperature) may exponentiallyincrease the problem space, but polynomial.

While FIGS. 7A through 8B show a non-limiting example of controlling thetemperature of a particular room, the present disclosure is not limitedthereto, and it should be appreciated that various embodiments of thepresent disclosure may be applied to any aspect of simulating,controlling, and/or monitoring environmental conditions, equipment, ordevices of a building, such as humidity, particulate count, occupancytime (actual and/or expected), lighting, audio/visual, fire safety,electrical, security, access control, lifts/escalators, and/or the like,for example.

Referring again to FIG. 6, the model predictive engine 614 may generatemodel predictive control algorithms to be used by the controller 502. Inone embodiment, the model predictive engine 614 may generate modelpredictive control algorithms based on internal dynamic models of thesystem, a history or past control moves, and an optimization costfunction to calculate the optimum control moves. In one embodiment, themodel predictive control algorithms may be nonlinear model predictivecontrol algorithms. In other embodiments, the model predictive controlalgorithms may be robust model predictive control algorithms. The modelpredictive engine 614 may generate the predictive control algorithms andprocess data received by the controller 502. The model predictive engine614 may then output the generated algorithms to one or more softwareagents. In other embodiments, the model predictive engine 614 maygenerate the model predictive control algorithms and subsequently outputthe algorithms to one or more software agents in the system 500. Themethods of generating and/or configuring software agents will bedescribed in more detail below.

The test-observe learning engine 616 may generate testing algorithmsbased on performing a given test and observing the results. For example,the test-observe learning engine 616 can vary multiple setpoints withinsystem 500, and monitor the outputs to determine reactions of the system500. In some embodiments, the reactions may be based on outputs of thesystem 500. In other embodiments, the reactions may be based on userfeedback. For example, the user may respond that they did not like theoutputs from a particular test generated by the test-observe learningengine 616, which may then store the user feedback as a result andmodify future tests accordingly. In some embodiments, the test-observelearning engine 616 may generate one or more software agents to performand monitor the tests. In some embodiments, the test-observe learningengine 616 may utilize existing software agents to perform and monitorthe tests. In one example, the test-observe learning engine 616 mayutilize one software agent to perform a given test, and utilize a secondsoftware to monitor the test. The methods of generating and/orconfiguring software agents will be described in more detail below.

The model free optimization learning engine 618 may generate one or moreoptimization models based on historical time series and/or real-timedata of the system 500. The model free optimization learning engine 618may utilize one or more model free methods to generate the optimizationmodels. Example model free methods can include: generate-and-test,enumeration, table lookup, mindless copying, adaptation, and/orevolution. These method-free methods may allow the model freeoptimization learning engine 618 generate one or more optimizationmodels without understanding the system 500 prior to being tasked withoptimizing the system 500. In one embodiment, the model freeoptimization learning engine 618 may provide the one or moreoptimization models to one or more software agents within the system500. In other embodiments, the model free optimization learning engine618 may generate one or more software agents to execute the optimizationmodels. In other embodiments, the model free optimization learningengine 618 may generate or utilize one or more software engines withinthe system 500 to execute one or more model free methods to develop anoptimization model. The methods of generating and/or configuringsoftware agents will be described in more detail below.

Referring now to FIG. 9 a block diagram schematic of the processingcircuit 504 of the controller 502 is shown, according to one embodiment.As described above, the processing circuit may be in communication withthe database 516, and one or more cloud-based applications 518. Thedatabase 516 may include data relating to one or more BMS's, such asbuilding layouts, system schematics, device information, controlschemes, environmental ratings, historical data, etc. In one embodiment,the database 516 includes contextual information accessible by theprocessing circuit. The contextual information may include dictionaries,historical data, scripts, and/or other data for interpreting contextualinformation. The one or more cloud-based applications 518 may be thosedescribed above. The one or more cloud-based applications 518 mayfurther be able to communicate with the processing circuit 504 toprovide data to or from other applications. In some embodiments, theprocessing circuit 504 may access the one or more cloud-basedapplications 518 directly. In other embodiments, the processing circuit504 may access the one or more cloud-based applications 518 via theadaptive interaction manager 506.

The processing circuit 504 is shown to include the processor 508 and thememory 510, as described above. In one embodiment, the memory 510includes the agent manager 514, the learning engine 512, the adaptiveinteraction manager 506, and a VR engine 904. In one embodiment, the VRengine 904 is used to process the information processed by the learningengine 512, the agent manager 514 and/or the cloud-based applications518. For example, the VR engine 904 may be used to process voice-to-textinformation provided by the cloud-based applications 518. Further, theVR engine 904 may have the ability to communicate with one or more BMSdevices or systems to read and/or write parameters via the BMS interface528, as described above. Further, the VR engine 904 may be a virtualassistant engine which can process information provided via theapplications. In some examples, the VR engine 904 may be a third partyVR engine, such as Apple's Siri, Microsoft's Cortana, or Amazon's Alexa.The third party VR engines may be stored locally in the memory 510, oraccessed via an internet connection. In some embodiment, the VR engine904 processes information received from the adaptive interaction manager506, via the adaptive interaction manager interface 530.

The memory 510 may further include the agent manager 514. While theagent manager 514 is shown to be within the memory 510, it iscontemplated that the agent manager 514 may be a cloud-based agentmanager 514 accessible by the processing circuit 504 or the adaptiveinteraction manager 506. In one embodiment, the agent manager 514generates and manages one or more agents 906 using the agent generator522, as will be described in more detail below. The agents 906 may besoftware applications that can run automated tasks (scripts). The agentgenerator 522 may generate the agents 906 based on information providedby the adaptive interaction manager 506. In one embodiment, the agents906 generated by the agent generator 522 may be configured to performsimple or complex tasks within a BMS or other system. For example, theagents 906 may interact with portions of a BMS system, such as thosedescribed in FIGS. 1-4 above. In some examples, the generated agents 906may be communicated directly to one or more devices within the BMS toperform the designated actions, as described in more detail below.

In one embodiment, a user defines the agents 906 to be generated by theagent generator 522 during an initial setup period of the controller502. Alternatively, a user may dynamically define one or more agents 906to be generated by the agent generator 522. The user may define theagents 906 by defining parameters and permissions associated with theagents 906, via one or more I/O devices 534. For example, where theagent 906 is to interact with a BMS device, a user may defineinformation related to the BMS to the agents 906, such as parametersassociated with one or more BMS devices, BMS device data, network data,general BMS data (building layout, control scheme, BMS equipment),schedules, etc. Alternatively, other information such as facilitycalendars, e-mail access (maintenance accounts, authorized personnelaccounts, etc.) may also be set for an agent. Further, permissions suchas controllable set-points, ranges within which the agent can modifycertain parameters, scheduling changes, etc., may also be defined withthe agents 906. The permissions may be based on the user defining theagents 906. Alternatively, the user, with the proper permission, may setthe permissions for other users who may interface with the agents 906.

In one embodiment, the user can define the agents 906 via the one ormore I/O devices 534, as described above. Alternatively, the user may beable to define the agents using a voice or gesture command. In oneembodiment, the agent manager 514 is able to dynamically define andgenerate agents 906 based on commands or requests received from a user.For example, the agent manager 514 may access the learning engine 512 todynamically define and generate agents 906, which will be discussed inmore detail below. The agent manager 514 may further be able to generateagents based on contextual data received from a user, such as thatdescribed above. For example, where a user states that “it is hot inhere,” an agent 906 may be generated by the agent manager 514 todetermine the temperature at the location of the user, and potentiallyinterface with the user to reduce a temperature of an area of afacility. Further, permissions may be dynamically created by the agentmanager 514. For example, the agent manager 514, receiving a request toset up an agent 906 from a user, may identify the user and then accessthe database 516 (or other connected database) to determine thepermission levels associated with that user. Additionally, permissionsmay be based on certain locations or areas within a facility. Thepermissions may determine which parameters are available for thegenerated agent 906 to read and/or write.

In one embodiment, the agent manager 514 may generate a location basedagent 908. The location based agent 908 may have defined parameters andpermissions associated with a given location with a BMS and/or facility.For example, the executive suite may require additional permissions thana normal conference room. In one embodiment, the location is based onthe location of the user defining the agent 908 (e.g. “lower thetemperature in this room”); however, the location may also be based onthe location of the system or device that the user is attempting tomonitor/control (e.g. “lower the temperature in room XYZ”). In oneembodiment, the location is established by determining a location of afixed position user interface, such as I/O devices 534 described in FIG.5, above. For example, where the I/O device 534 is a smart thermostat,the agent manager 514 may access the database 702 to determine alocation associated with the user interface. In other examples, the I/Odevice 534 may provide its location to the agent manager 514 directlywhen communicating with the adaptive interaction manager 506. In otherexamples, the I/O device 534 may not have a fixed location, such aswhere the I/O device 534 is located on a mobile device. In oneembodiment, the I/O device 534 provides location information regardingthe location of the I/O device 534 to the adaptive interaction manager506. For example, the I/O device 534 may provide GPS data, altimeterdata, Wi-Fi data, etc. to the adaptive interaction manager. In oneembodiment, the agent manager 514 compares the location data withbuilding and/or facility layout data in the database 516 to determine alocation of the I/O device 534 in relation to a BMS and/orbuilding/facility.

In a further embodiment, the agent manager 514 may generate afunction-based agent 910. The function based agent 910 may have definedparameters and permissions associated with a given function or series offunctions associated with a BMS. For example, the agent manager 514 maygenerate a functional-based agent 910 such as an “energy managementagent.” The energy management agent may be defined to monitor and/orevaluate energy related data associated with a BMS. For example, theenergy management agent may monitor and evaluate energy related datasuch as kWh, peak demand, etc. Other functional-based agents 910 mayinclude chiller management agents, HVAC management agents, lightingmanagement agents, etc. In some embodiments, the function based agents910 are configured by the agent manager 514 to generate context specificreports for related functions. In some examples, the function-basedagents 910 may evaluate the user, type of available data, location, etc.and generate dynamic reports. In other examples, the user can definewhat parameters/data is requested in the reports. In still furtherexamples, a user may be able to modify the dynamically generated reportsover time by indicating which data is and is not required and/or desiredby the user. Further, the user can provide feedback to thefunction-based agent 910 to provide additional guidance related to thefrequency with which the reports should be generated (i.e. daily,weekly, monthly, etc.). While the function-based agent 910 or thelocation based agent 908 may generate reports, a report generating agent912 may also be generated to produce reports. In one embodiment, thereport generating agent 912 may be able to generate reports acrossmultiple locations and/or functions.

In some embodiments, the agent manger 514 may generate equipment agentsfor various building equipment (e.g., BMS devices) such as thosedescribed with reference to FIGS. 1-4. Each equipment agent may beassociated with a specific device within the BMS, such that equipmentagent for the specific device is a digital twin or shadow of thespecific device. For example, a VAV may have an associated VAV agent, asensor may have an associated sensor agent, an AHU may have anassociated AHU agent, a chiller may have an associated chiller agent, anRTU may have an associated RTU agent, and/or the like. Thus, anassociated equipment agent is a software representation of theassociated equipment, and may have the same states and controls of theassociated equipment. For example, a corresponding equipment agent mayhave access to the same inputs and outputs as those of the associatedequipment. Further, the corresponding equipment agent may be able tocontrol and/or monitor various parameters of the associated equipment.However, in some embodiments, an equipment agent is not limited torepresenting a single device or equipment, for example, an equipmentagent may represent a logical group of devices or equipment (e.g., allAHU's, all VAV's, all temperature sensors, all thermostats, or thelike).

In some embodiments, the agent manager 514 may generate space agents forvarious spaces (e.g., building, floor, room, zone, and/or the like) of acorresponding building. However, in some embodiments, a space agent isnot limited to representing a single space (e.g., building, floor, room,zone, and/or the like), for example, a space agent may represent alogical group of spaces (e.g., all meeting rooms on floor 5, allrestrooms in the building, or the like). In some embodiments, each spacehas its own programmable optimization state (e.g., optimized forcomfort, optimized for cost, or the like), and the space agent for eachspace represents the programmable optimization state for the space. Insome embodiments, the space agent may monitor and control anenvironmental condition of the associated space based on theprogrammable optimization state for the space. For example, in someembodiments, space agents own the temperature setpoint for theirrespective space, and can calculate the effective temperature setpointfor their respective space based on the optimization state of the space.However, the present disclosure is not limited thereto, and it should beappreciated that space agents may be used to control and/or monitorother environmental conditions of their particular space, such ashumidity, particulate count, occupancy time (actual and/or expected),lighting, audio/visual, fire safety, electrical, security, accesscontrol, and/or the like, for example.

In some embodiments, space agents may monitor the conditions andparameters of the space, as well as the health of the various equipmentthat serve the space. For example, the space agent may monitor thecurrent temperature, humidity level, size, location, number of windows,number of occupants, occupancy patterns, and/or the like of the space.Further, the space agent may monitor the health or status of sensors,lighting devices, blinds or shades, VAV units, AHU, and/or otherbuilding equipment that serve the space. In some embodiments, the spaceagent may be a parent of all of the agents associated with the space. Insome embodiments, space agents may have a hierarchal order such that aspace agent of a higher order may override controls of each of the spaceagents (and/or other agents) of a lower order. For example, a buildingagent may be the parent of all of the floor agents in the building, eachof the floor agents may be a parent of all of the room agents associatedwith a particular floor, each of the room agents may be a parent of allequipment agents that serve a particular room, and/or the like. In someembodiments, the parent agents may communicate with each of thecorresponding child agents by exchanging messages via channels that theparent agents and/or child agents are subscribed to, as will bedescribed in more detail below.

In some embodiments, the agent manager 514 may generate control agents.Control agents may be similar to function-based agents, but areconfigured to provide commands or logic to the other agents to optimizeor override various control functions. For example, in some embodiments,control agents include optimization algorithms that are used by thespace agents to optimize a space for a given optimization state. In someembodiments, the control agents communicate with the space agents tooptimize or override controls of the equipment serving the particularspace, and the space agents communicate with the equipment agents toprovide controls to the equipment agents for controlling the equipmentserving the particular space. Accordingly, each of the space agents andequipment agents are informed of the optimization or override commands,without the control agents having to determine the equipment andcorresponding equipment agents that service a particular space. However,the present disclosure is not limited thereto, and in other embodiments,the control agents can communicate with the space agents and theequipment agents concurrently (or simultaneously) via a correspondingchannel, which can reduce latencies in the communication chain. In someembodiments, control agents can include, for example, global datasharing agents, temporary occupancy override agents, scheduled exceptionagents, flow setpoint reset agents, optimal start/stop agents, reheatvalve control agents, unoccupied mode night setback agents, chillersequencing agents, and the like.

In a non-limiting example, referring to FIG. 10, a temporary occupancyoverride agent is shown, according to one exemplary embodiment. Thetemporary override agent 1002 (who is named Comfy in this example) mayprovide an interactive interface 1000 to a user to temporarily overridea pre-set environmental condition in a space (e.g., a room). While FIG.10 shows that the interactive interface 1000 is presented to the user ona display device, the present disclosure is not limited thereto, and inother embodiments, the interactive interface may be a voice recognitioninterface such as those discussed above with reference to FIG. 5. In theexample shown in FIG. 10, the space is a meeting room. Generally, aspace agent associated with the meeting room may modify theenvironmental setpoints within the meeting room based on multiplefactors, including a schedule of events within the room. The space agentmay lower (or increase) the temperature of the meeting room prior to,and during a scheduled meeting. Once the meeting is scheduled toconclude, the space agent may adjust the environmental parameters toconserve energy. The temporary occupancy override agent 1002 may allowusers to indicate that they are still occupying the meetings space (e.g.if a meeting goes long), and in response, the temporary occupancyoverride agent 1002 may override the space agent's settings to ensurethat the temperature of the meeting room remains at a comfortablesetting. In other embodiments, the temporary occupancy override agent1002 (or the space agent for the meeting room, as another example) maybe able to detect occupancy in a space (e.g., via an occupancy sensor),and can adjust the environmental setpoints accordingly, regardless of anoccupancy schedule of the space.

In some examples, the temporary occupancy override agent 1002 mayreceive an indication from an occupant that they would like theenvironmental setpoints to be modified to make the occupant(s) morecomfortable. For example, the temporary occupancy override agent 1002may provide a command interface 1004 on the interactive interface 1000,or receive a natural language voice command via a voice recognitioninterface. In this case, if the occupants prefer a temperature otherthan the normal settings, or if the meeting room remains occupiedoutside of a scheduled time, the temporary occupancy override agent 1002may allow the occupants to make temporary changes to the environmentalsetpoints. For example, the temporary occupancy override agent 1002 mayonly allow the occupants to modify the environmental setpoints after aset time has lapsed, such as seven minutes, but other time periods arecontemplated. In some embodiments, the occupants can specify for howlong the environmental setpoints should be modified. Restricting thetime period for which the occupant can modify the environmentalsetpoints ensures that energy is not wasted, which may occur when theoccupants are only in the meeting space for a short, unscheduled period.In some embodiments, the temporary occupancy override agent 1002 mayonly allow the user that has scheduled the meeting to modify theenvironmental setpoints. In other embodiments, the temporary occupancyoverride agent 1002 may allow each of the expected attendees (e.g., asdetermined via the meeting invite) to modify the environmentalsetpoints. However, the present disclosure is not limited thereto, forexample, in other embodiments, the temporary occupancy override agent1002 may allow any occupant within the meeting room to modify theenvironmental setpoints.

While the temporary override agent shown in FIG. 10 is shown to overridea temperature of the meeting room, the present disclosure is not limitedthereto, and it should be appreciated that control agents may be used tooptimize and/or override any suitable environmental conditions,equipment, or devices of a building, such as humidity, particulatecount, occupancy time (actual and/or expected), lighting, audio/visual,fire safety, electrical, security, access control, lifts/escalators,and/or the like, for example.

The above described agents are exemplary only, and it is contemplatedthat other agent types may be generated to provide any functionalitywithin the capability of the system 500. Further, it should be knownthat one or more of the location based agent 908, the function basedagent 910, the reporting agent 912, the equipment agent, the spaceagent, and/or the control agent may be combined into a single agentgenerated by the agent generator 522. For example, a BMS-need agent maybe generated. The BMS need agent may be an autonomous agent that canevaluate current needs of the BMS 525, and perform tasks independentlyto address the needs. Further, a BMS sequence optimizer agent may begenerated. The BMS sequence optimizer agent may be utilized to evaluatethe sequence of operations within the BMS 525. The BMS sequenceoptimizer agent may then perform optimization functions to the sequencesof the BMS 525 to increase the operating efficiency of the BMS 525.

In various embodiments, the agents described above can generallycommunicate with each other, and with the BMS in general, usingmessages. Messages may be serialized pieces of data that are publishedto a channel. The channel may allow the messages to be sent to allagents that are subscribed to the channel. In one embodiment, eachmessage may contain a unique identifier and the identifier of the agentthat published the message. An agent can publish (e.g. send) a messageto a channel or subscribe (receive) a message from a channel. A messagethat is published to a channel is received by all subscribers to thatchannel. A channel may contain any group of agents that need tocommunicate with each other. In some embodiments, channels are themedium used by the agents to send and receive messages, and passingmessages may be the only method of providing communication to and fromagents. Further, the messaging infrastructure and the agents may beseparate from each other. For example, the agents may be configured tonot know their location, other agents in the group, or any other detailsof the messaging infrastructure. Likewise, the messaging infrastructuremay not know anything about the agents other than which agent to sendmessages to. The generation and configuration of channels will bedescribed in more detail with reference to FIGS. 11 through 13 below.

Referring again to FIG. 9, the agent manager 514 may further include atraining module 914, and an agent intelligence module 916. The trainingmodule 914 is an exemplary module that may be within the agent manager514. The training module 914 can be used to train one or more of theagents generated by the agent manager 514. The training module 914 maydefine boundaries and expectations associated with agents generated bythe agent generator 522. While the training module 914 is shown as astandalone module in the agent manager 514, the training module 914 maybe incorporated into one or more generated agents. In one example, thetraining module 914 may define what parameters for a given BMS devicemay or may not be adjusted. The training module 914 may also definevalue ranges within which parameters associated with BMS devices may beadjusted. In other examples, the training module 914 may train theagents by defining other conditions required to modify or access certainparameters. For example, parameters associated with certain BMS devicesmay only be accessible during certain times, by certain users, etc. Inone embodiment, the training module 914 may be in communication with thedatabase 516 to access information about the BMS and associated devices,such as schedules, permissions, rules, connected systems, etc.

In some embodiments, the adaptive interaction manager 506 can provideinformation to the training module 914 to further train the agentsgenerated by the agent manager 514. For example, user data may bepresented to the adaptive interaction manager 506 via the I/O devices534 indicating when the user would like certain functions to beperformed by one or more of the generated agents. This information canbe processed by the adaptive interaction manager 506 and passed to thetraining module 914 via the processing circuit 504. For example, theuser may want reports generated at a certain time each day, and that thereports contain information gathered over a user defined time period.Further, the user may define what information is desired to be in thereport. In other examples, user data may instruct the training module914 to “train” the agents to perform certain tasks such as optimizationof energy usage during certain times or in certain locations.

The training module 914 may further allow for user specified outcomesand objectives to be used to further train generated agents 906. Byallowing for user specified outcomes and objectives to be used, theagents can constantly evolve to provide more accurate feedback. Examplesof user specified outcomes and objectives training can include feedbackafter mistakes or incorrect outputs are generated by an agent 906. Inone example, an agent 906 may suggest and perform a particular function,and subsequently provide a report to a user indicating the outcomeassociated with the performed action. The user then may be asked if theagent 906 should continue to perform the particular function in thefuture. This information may be stored in the agent 906, as well as thetraining module 722. This can allow the training module 722, and theagent manager 514 in general, to learn what is likely to be acceptableby the user. Further, this information can be provided to the learningengine 512, which may process the feedback to help learn from previouslygenerated agents. For example, a function-based agent 910, such as anenergy management agent, may suggest running chillers in parallel todecrease the time to regulate temperature in a portion of a facilitywhen there are sudden temperature swings (e.g. when a large group ofpeople enter a room to attend a meeting). However, if the cost is toohigh to run parallel chillers, a user may instruct the agent 910 to stoprunning the chillers in parallel. This information is gathered by thetraining module 914 and provided to the learning engine, which mayupdate a knowledgebase. In some embodiments, the training module 722 maystore the information in the database 516. Over time, the trainingmodule 722 may collect enough information to learn what are acceptablecosts for certain gained efficiencies and can instruct the agent 906 toperform its tasks accordingly. In still further examples, the trainingmodule 914 may include cost restrictions associated with agentfunctions. For example, some actions may not be allowed where it isdetermined that the associated cost would exceed a given value. In otherexamples, the cost restrictions may be associated with the userpresenting the request. In that instance, a supervisor, or person withauthority to approve the cost may be contacted, and allowed toapprove/disapprove the change. For example, a text message could begenerated and transmitted to a mobile device associated with theauthorized person who can reply to the text message to approve or denythe cost, via the adaptive interaction manager 506. Other communicationmethods such as e-mail, push notifications, etc., are furthercontemplated.

In other examples, a user may be presented with a list of possibleactions that an agent can perform in certain situations, allowing a userto select which particular action should be performed. In oneembodiment, the possible actions are presented to the user via a userinterface, such as those described above. Further, the training module914 may store the user selections (e.g. in the database 516) and learnover time how a user generally proceeds, and take the actions withoutconsulting the user in each occurrence.

In a further embodiment, the training module 914 may provide an agent906 with new rules via the agent manager 514. For example, a user 538may be presented with a question of “would you like an alert if this (agiven situation) happens again” via an I/O device 534. If the userresponds in the affirmative, the training module 914 may create a rulewithin the associated agent 906 to generate an alert to be provided tothe user 538 when the condition occurs in the future. Further, the usermay be prompted if they “would like a monthly report showing data forUnit X?” Again, if the user responds in the affirmative, the trainingmodule 914 may create a rule within the associated agent 96 to generatea monthly report showing data for unit X. Alternatively, the trainingmodule 914 may instruct the agent generator 522 to generate a reportingagent associated with unit X, and provide parameters around what shouldbe included in the report. Further, the above alert rules and reportsmay be modified over time as more information becomes available. Forexample, more rules may be added, such as providing for alerts regardingchanges to preventative maintenance (PM) schedules, and/or assignmentsof maintenance persons.

The agent manager 514 may further include an agent intelligence module916. The agent intelligence module 916 may evaluate a request by a user538 to attempt to provide intelligence around the generated agent 906.For example, the agent intelligence module 916 may determine what theuser's 538 purpose is in generating the request. For example, the agentintelligence module 916 may analyze if the purpose is to generate areport, optimize a system, perform simple or complex controls, etc. Thismay be used by the agent generator 522 in determining what parameters,attributes, etc., should be placed on a generated agent. Further, theagent intelligence module 916 may determine what a user 538 wants. Forexample, does the user 538 want a basic or isolated data point, or doesthe user 538 want data to be provided over time. Further, the agentintelligence module 916 may determine what reports, sequences, or otherdata the user cares about. In some instances, the agent intelligencemodule 916 may access the database or the learning engine 512 to seewhat a particular user has requested in the past. Further, the agentintelligence module 916 may access the database 516 to determine whattypes of data, reports, etc. a user has requested or accessed over time.This information can be provided to the agent generator 522 to helpcustomize agents to be a particular user's 538 specifications.

Agent Messaging Infrastructure

As briefly discussed above, the various agents described herein are usedto simulate a building or system, and communicate with each other bypublishing messages via one or more communication channels. The use ofagents and agent-based communication can provide multiple advantagesover current BMS systems. Agent-based communication systems describedherein can facilitate speed and efficiency improvements over othersystems. For example, communication channels can be automaticallycreated in response to a set of conditions, and may be dynamicallymodified according to changing events or conditions. In someembodiments, the conditions may be defined by the agents, for exampleaccording to building management system controls, occupancy withinspaces, and the like. By registering an agent to a particular spacewithin a defined building space hierarchy, messages can be automaticallycommunicated upstream to parent agents (e.g., parent spaces) and/ordownstream to child agents (e.g., child spaces, equipment, and/or thelike). Furthermore, ad hoc generation of communication channels enablescommunication to be dynamically managed for a particular purpose.Accordingly, for example, messages that are sent, received, archived,and/or retrieved over a communication channel can be limited to thepurpose (e.g., by limiting the devices that may publish messages, or thetypes of messages from each device) and dynamically modified. Thecommunication channel may in effect perform similar to a “filtered”channel, simplifying analysis of published information, requiring lessdata to be searched by subscribers to the communication channel (e.g., abuilding controller), and fewer computer processor cycles.

Turning now to FIG. 11, a block diagram of an agent-based communicationsystem 1100 is shown, according to one embodiment. The system 1100 maybe any of the BMS systems described above. In some embodiments, thesystem 1100 may be a part of the adaptive agent based control system asdescribed with reference to FIG. 5, or may be separate from the adaptiveagent based control system. Further, the system 1100 may be apeer-to-peer (P2P) network, such as a Verisys system from JohnsonControls. The system 1100 may include a controller 1102. The controller1102 may be a dedicated controller within a BMS. In one embodiment, thecontroller 1102 is a cloud-based server (i.e. an internet-based server).For example, the controller 1102 may be physically located in one ormore server farms and accessible via an internet connection. In someexamples, the controller 1102 may be a standalone device in apeer-to-peer (P2P) network, such as a Verisys system from JohnsonControls. The controller 1102 may include a processing circuit 1104. Theprocessing circuit 1104 may include a processor 1108 and a memory 1110.The processor 1108 may be a general purpose or specific purposeprocessor, an application specific integrated circuit (ASIC), one ormore field programmable gate arrays (FPGAs), a group of processingcomponents, or other suitable processing components. The processor 1108is configured to execute computer code or instructions stored in thememory 1110 or received from other computer readable media (e.g., CDROM,network storage, a remote server, etc.).

The memory 1110 may include one or more devices (e.g., memory units,memory devices, storage devices, etc.) for storing data and/or computercode for completing and/or facilitating the various processes describedin the present disclosure. The memory 1110 may include random accessmemory (RAM), read-only memory (ROM), hard drive storage, temporarystorage, non-volatile memory, flash memory, optical memory, or any othersuitable memory for storing software objects and/or computerinstructions. The memory 1110 may include database components, objectcode components, script components, or any other type of informationstructure for supporting the various activities and informationstructures described in the present disclosure. The memory 1110 may becommunicably connected to the processor 1108 via the processing circuit1104 and may include computer code for executing (e.g., by the processor1408) one or more processes described herein. When the processor 1108executes instructions stored in the memory 1110, the processor 1108generally configures the processing circuit 1104 to complete suchactivities.

The memory 1110 is shown to include a channel manager 1118, a zonemanager 1116, an agent manager 1114, and a message log database 1112.Although the channel manager 1118, the zone manager 1116, the agentmanager 1114, and the message log database 1112 are shown in the memory1110, in other embodiments one or more are provided separately from thememory 1110, such as within the BMS controller 1126, the security system1152, or the cloud-based service 1120.

In some embodiments, the agent manager 1114 may be similar to or thesame as the agent manager 514 described with reference to FIG. 5. Forexample, in some embodiments, the agent manager 1114 maintains a recordof all agents previously generated and active within the system 1100.Further the agent manager 1114 may also maintain real time data relatingto which agents are currently active, and which agents are not currentlyactive. The agent manager 1114 may further maintain real time datarelating to which device within the system 1100 a particular agent iscurrently associated with. Further, the agent manager 1114 may generatea number of agents, such as agent 1124 (or any of the types of agentsdiscussed above), for use in the system 1100.

In some embodiments, the agent manager 1114 may communicate thegenerated agents to the BMS via a communication interface 1128. Thecommunication interface 1128 may be one or more wireless or wiredinterfaces. In some embodiments, the communication interface 1128 mayinclude a wireless interface such as cellular (3G, 4G, LTE, CDMA, etc.),Wi-Fi, ZigBee, Bluetooth, RF, LoRa, etc. Additionally, the communicationinterface 1128 may include wired interfaces such as USB, Firewire,Lightning Connectors, CAT5 (wired internet), UART, serial (RS-232,RS-485), etc. In some embodiments, the communication interface 1128 mayinclude a network connection, such as a BACnet network connection.

In some embodiments, the zone manager 1116 is configured to define aspace within one or more buildings or zones. In some embodiments, thezone manager 1116 can be configured to define a building space hierarchythat maps each room or portioned space within each floor within abuilding. In this regard, the zone manager 1116 can be configured to mapor define each BMS device within the building zone hierarchy, forexample by mapping the BMS device to a building space (e.g., a room of abuilding floor).

In some embodiments, the zone manager 1116 is configured to define abuilding control zone. The building control zone can be associated witha control circuit that regulates operations of a BMS device in responseto an input, such as data point values of a building sensor. In thisregard and as described herein, the channel manager 1118 can beconfigured to generate a communication channel for the building controlzone and register agents associated with spaces and/or BMS devices tothe generated communication channel.

In some embodiments, the zone manager 1116 is configured to define aphysical location zone and/or a geolocation zone. The physical locationzone and/or the geolocation zone can relate to a physical location of aperson or a building device, such as a GPS position or a location withina building. In some embodiments, the physical location zone generallycorresponds to a static location and the geolocation zone generallycorresponds to moving location. In some embodiments, a physical locationof a person can be determined based on any method disclosed herein, suchas location information received from a computing device (e.g., the userdevice 1134) associated with a person. The zone manager 1116 can beconfigured to generate a geolocation zone that follows the computingdevice. Any size or type of physical location zone and geolocation zonecan be used. For example, a geolocation zone can correspond to acircular area having a one-mile diameter with the computing device atthe center. In some embodiments, the physical location zone and/orgeolocation zone size can vary based on an input condition. For example,the zone manager 1116 can be configured to increase the size of thegeolocation zone when a distance of the computing device relative to alocation exceeds a particular threshold distance value.

The channel manager 1118 can be configured to generate a communicationchannel associated with a space, equipment, control function, and/or thelike, and manage registration of agents to the communication channel. Inthis regard, when an agent is registered to a communication channel, theagent may receive and/or publish messages over the communication channelas described herein. For example, an agent associated with a computingdevice may be registered to a communication channel associated with aphysical location zone when the geolocation overlaps with a portion ofthe physical location zone. In another example, the channel manager 1118can be configured to create a communication channel associated with aphysical location zone in response to an occupancy level, as describedherein.

In some embodiments, the channel manager 1118 can be configured toregister an agent associated with a BMS device during commissioning ofthe BMS device. For example, if a new BMS device is added and mapped toa building space (e.g., a zone, room, or floor in a building), channelmanager 1118 can be configured to automatically register the agentassociated with the BMS device to a corresponding communication channelfor the space. In this regard, the zone manager 1116 can be configuredto map the BMS device to a particular space of the building, e.g., aphysical location zone and/or a building control zone.

In some embodiments, the channel manager 1118 can be configured tocreate and/or manage a communication channel based on attributesassociated with one or more agents. In an example implementation,employees of a business can each be associated with a computing device,whereby an agent associated with the computing device includes one ormore attribute values indicating a job title, experience level, healthinformation, etc. The channel manager 1118 may be configured to createand/or manage a communication channel, for example to ensure the safetyof the employees, mitigate business risks, and the like.

In some implementations, the channel manager 1118 is configured toperform security related tasks for a communication channel. In someembodiments, the channel manager 1118 can be configured to perform anauthentication process prior to or during registration of an agent to acommunication channel. Any suitable authentication process may be used,including password, tokenization, biometric, and/or multi-factorsystems. In some embodiments, the authentication process may varydepending upon a level of access or risk associated with registration ofan agent to a communication channel.

In some embodiments, the channel manager 1118 is configured to performan authorization process to determine whether a particular agent hassubscription access and/or a level of subscription access. For example,an agent associated with a temperature sensor may not be authorized tosubscribe to messages from the communication channel, even though theagent associated with the temperature sensor is authorized to publishmessages on the communication channel (e.g., relating to temperaturemeasurements). In contrast, an agent associated with a thermostat may beauthorized to publish messages as well as to subscribe to messages onthe communication channel, for example to receive messages withinformation relating to a control setpoint. In either example,authorization may or may not be limited, e.g., to all messages of thechannel, to building control messages of the channel, totemperature-related messages of the channel, and/or the like.

As another example implementation, an agent associated with a computingdevice of an independent contractor may have only limited subscriptionaccess to messages published over a channel (e.g., to receive securityalerts). In contrast, an agent associated with a computing device of asystem level administrator or top-level executive may be authorized toreceive all messages published over a channel.

In some embodiments, the channel manager 1118 is configured to performan authorization process to determine whether a particular agent haspublication access and/or a level of publication access. Publicationaccess may be selectively configured based on the type of device, forexample to limit the number of messages published over a channel and thecorresponding data on the channel. For example, an agent associated witha building device may not have publication authorization or limitedpublication authorization based on a particular control circuit andinputs therein.

In some embodiments, the channel manager 1118 is configured to storeauthentication and/or authorization information as one or moreattributes of an agent. In some embodiments, the channel manager 1118may be configured to interact with other devices or systems describedherein to facilitate authentication and/or authorization. In someembodiments, authentication and/or authorization processes are handledby other devices or systems described herein, and not by the channelmanager 1118. For example, in some embodiments, authentication and/orauthorization processes may be handled by one or more agents.

In some embodiments, the channel manager 1118 is configured to storepublished messages of a communication channel in the message logdatabase 1112. In some embodiments, an agent can be configured toretrieve stored messages. For example, in some embodiments an agent maybe configured with an attribute relating to whether the agent has an“active” status, e.g., whether the agent is actively receiving and/orpublishing messages to the channel. For example, an agent withsubscription to a communication channel may be “inactive,” such that theagent does not actively receive published messages. In this regard, theagent can subsequently retrieve unreceived messages from a database, asdescribed herein.

In some embodiments, message passing may be implemented via a RedisPub/Sub system. In Redis Pub/Sub semantics, an agent or function maypublish messages on any authorized channel arbitrarily simply by callingthe PUBLISH command and specifying the name of the channel. Furthermore,abstraction provides agents with no (direct) control over which channelsthey communicate on. However, exceptions can be configured using a linkproperty of an agent's configuration. In general, all messages and agentoutputs are published on all the channels on which the agent isauthorized to publish to, according to the semantics described above. Asimilar process may be used to decide which messages an agent shouldreceive.

For example, referring to FIGS. 12A and 12B, various flow chartsillustrating a number of publish-subscribe messaging patterns are shown,according to some embodiments. In FIG. 12A, a first messaging pattern1200 illustrates a stand messaging scheme. A publisher 1202 publishes amessage onto a channel 1204, which is then transmitted to subscribers1206, 1208, and 1210 that are subscribed to the channel 1204, asdiscussed above. In FIG. 12B, a second messaging pattern 1250illustrates a publisher 1252 publishing a message, which is thenreceived by a communication infrastructure system 1254. Thecommunication infrastructure system 1254 may be configured to parse themessage for a specific aspect, such as a topic, an associated space,associated equipment, etc. The communication infrastructure system 1254can then determine which channel 1254 and/or 1258 the message should betransmitted to, and provides the message to subscribers of that channel.In other embodiments, the publisher 1252 can publish messages to each ofthe channels 1256 and 1258, which is then transmitted to subscribers1260, 1262, and 1264 that are subscribed to the channels 1256 and 1258.As shown in FIG. 12B, subscriber 1 1260 is only subscribed to channel A1256, subscriber 2 1262 is subscribed to both channels A and B 1256 and1258, and subscriber 3 1264 is only subscribed to channel B 1258.Example communication infrastructures may utilize decoupling andasynchronous delivery, as well as multiway delivery. This can allow forhigh throughput within the communication infrastructure. By using amessage and channel based communication infrastructure, a scalable,persistent and anonymous communication scheme may be created.

Referring again to FIG. 11, in some embodiments, channel manager 1118 isconfigured to generate special channels. Special channels are treateddifferently from other channels (e.g., standard channels). In someembodiments, special channels may include command channels, agents statechannels, metadata channels, waypoint channels, and or the like, whichmay be identified by a universally unique identifier (UUID) (e.g.,randomly generated) at runtime. In some embodiments, the waypointchannel is used to process messages sent into the system from othersystems or tools. In some embodiments, the command channel may be usedto pass processed external instructions inside the building simulation.In some embodiments, the agent state channels and the metadata channelsare used to publish information about the simulation to external systemsor tools.

For example, the waypoint channel may be configured such that messagespublished to the waypoint channel may be arbitrary JSON, and are handledby the JSON to Haystack Bridge Agent. In order to maintain compatibilitywith the Haystack oriented internal semantics of the simulation'smessaging infrastructure, the agent receives external commands, andconverts them to a haystack compatible grid structure where the valuesof the grid rows are JSON encoded messages. The converted messages maythen be sent out on the command channel.

The command channel may be subscribed to by all agents that process orexecutes the commands, and is intended to facilitate passing command andcontrol instructions to a running simulation without getting “external”commands mixed up in other channels, or requiring knowledge of thenetwork topology of a given simulation. From the agent's perspective(since agents are not aware of the channel a given message wasreceived), command messages are identified by having “outside command”in the action column of the message's haystack grid, and have a JSONencoded payload in the actionVal column. The individual agents may thendefine their behavior with respect to these external messages, whichcould be set up to mirror internal messaging behavior, add inparameterized tweaks, and/or the like.

The metadata channel is used to publish simulation configurations andmetadata to any external tools, such as a Web UI. In one embodiment,three metadata messages are sent per simulation run, but the presentdisclosure is not limited thereto, and in other embodiments more or lessthan three messages may be sent at a time. For example, in someembodiments, the three messages include a hierarchical structure ofagents and zones which are used by the external tools to build a spacenavigation element, the UUID of a corresponding waypoint channel, andchannel information that each agent publishes on to be used by theexternal tool to display state changes of a given space. The agent statechannel is used to publish public portions of an agent's state. Bydefault, the agent state includes any setpoints, outputs, or sensordata, but can be configured to output arbitrary parts of the agent'sstate by overriding a public state function on an agent. In someembodiments, agents may only publish messages within the system when avalue changes. In other embodiments, the agents may publish data onceper clock cycle for every agent on the Agent state channel to provide areal-time view of the agent state.

Still referring to FIG. 11, the user device 1134 may be any devicecapable of communicating to the controller 1102, as well as providing adevice for a user 1138 to interface with the system 1100. In someembodiments, the user device 1134 may include personal computing devicessuch as smart phones (iPhone, Android phone, Windows phone), tabletcomputers (iPad, Android Tablet, Windows Surface, etc.), laptopcomputers, and/or desktop computers. The user device 1434 may furtherinclude a stand-alone device such as an Amazon Echo, or even anon-mobile device such as a voice capable thermostat, or other dedicateduser device.

The BMS controller 1126 may be any BMS controller as described herein.In some embodiments, the BMS controller 1126 may be a dedicated BMSinterface device, such as an Athens Smart Hub device from JohnsonControls. In some embodiments, the controller 1102 is configured tocommunicate with the intermediate devices 1146 via the BMS controller1126. Each of the intermediate devices 1146 and the local devices 1148may be any BMS or HVAC device as described herein. In some embodiments,the intermediate devices 1146 may include device controllers, sub-systemcontrollers, RTU's, AHU's, etc. In some embodiments, the local devices1148 may include thermostats, valves, switches, actuators, etc. As shownin FIG. 11, in some embodiments, there is no direct connection betweenthe agent manager 1114 and the local devices 1148. In this case, theprocessing circuit 1104 may transmit the agent generation parameters tothe local device 1148 via the BMS controller 1126 and one or more of theintermediate devices 1146.

In some embodiments, the agent generation parameters may includeinstructions to the BMS controller 1126 and the intermediate device 1146to pass the agent generation parameters to the local device 1148 forinstallation. In still further embodiments, the agent generationparameters may be a fully functional agent, which, upon being receivedby the BMS controller 1126, can further propagate itself to the localdevice 1148 via the intermediate device 1146. For example, agentgeneration parameters may include system data, which allows the agent tomap a path to the required local device 1148. Once the agent generationparameters have been received at local device 1148, an agent can installitself onto local device 1148. In some embodiments, the agent parametersare installed on a memory of the local device 1148, and an executableprogram file is executed using a processing device of the local device,thereby generating the agent within the local device 1148.

The security system 1152 may include multiple elements associated with afacility or building security system. For example, the security system1152 can include multiple devices such as occupancy sensors or systems,cameras, microphones, motion detectors, thermal sensors, access devices(RFID locks, biometric locks, etc.), entry logs, etc. In one embodiment,the security system 1152 provides data to the controller 1102. The datamay include occupancy data provided by the motion detectors and/orthermal sensors. Further, the data may include video and/or digitalimages provided by the cameras. In one embodiment, the digital imagesmay be provided to the cloud-based service 1120 for processing via thecontroller 1102. For example, the cloud-based service 1120 may be agesture recognition application, such as Microsoft Kinect.

Referring now to FIG. 13, an example channel hierarchal structure isshown, according to one exemplary embodiment. In some embodiments, spaceagents may be generated to represent every space in a building. Forexample, as shown in FIG. 13, a building agent 1302 may represent theentire building, floor agents 1306, 1308, etc., may represent eachrespective floor in the building, and room agents 1312, 1314, 1316,etc., may represent each room on each respective floor in the building.In some embodiments, the building agent 1302 may monitor, manage, orcontrol each of the agents that serves the building, the floor agents1306, 1308, etc., may monitor, manage, or control each of the agentsthat serves a corresponding floor, and the room agents 1312, 1314, 1316,etc., may monitor, manage, or control each of the agents that serves acorresponding room. Thus, in some embodiments, each of the space agentsmay have one or more associated communication channels, so that each ofthe space agents can communicate with other agents via their respectivecommunication channels.

For example, a building channel 1304 may be generated for the buildingagent 1302, a floor channel 1310, etc., may be generated for each of thefloor agents 1306, 1308, etc., and a room channel 1318, etc., may begenerated for each of the room agents 1312, 1314, 1316, etc. In someembodiments, the building agent 1302 may communicate with each of thefloor agents 1306, 1308, etc., via the building channel 1304, and eachof the floor agents 1306, 1308, etc., may communicate with each of theroom agents 1312, 1314, 1316, etc., on their respective floors via theirrespective floor channels 1310, etc. Thus, in this example, the buildingagent 1302 and each of the floor agents 1306, 1308, etc., may beregistered on the building channel 1304 to publish and/or subscribe tomessages received on the building channel 1304, and each of the flooragents 1306, 1308, etc., and their respective room agents 1312, 1314,1316, etc., may be registered on their respective floor channels 1310,etc., to publish and/or subscribe to messages received on theirrespective floor channels 1310, etc.

Similarly, in some embodiments, each of the room agents 1312, 1314,1316, etc., may communicate with other agents (e.g., thermostat agent1322, temperature sensor agent 1324, control agent 1326, and/or thelike) that serve their corresponding room via a corresponding roomchannel 1318, etc. Thus, in this example, each of the room agents 1312,1314, 1316, etc., and their respective other agents (e.g., thermostatagent 1322, temperature sensor agent 1324, control agent 1326, and/orthe like) that serve their corresponding room may be registered on theirrespective room channels 1318, etc., to publish and/or subscribe tomessages received on their respective room channels 1318, etc. Thus, inthis example, messages that are published from parent agents can betransmitted downstream to child agents, and messages that are publishedfrom the child agents can be transmitted upstream to the parent agentsas needed or desired.

For example, if the building is in an emergency state, the buildingagent 1302 can publish an emergency message on the building channel1304, each of the floor agents 1306, 1308, etc., can receive theemergency message on the building channel 1304 and republish theemergency message on their respective floor channels 1310, etc., each ofthe room agents 1312, 1314, 1316, etc., can receive the emergencymessage on their respective floor channels 1310, etc., and republish theemergency message on their respective room channels (and/or otherchannels) 1318, etc., and each of the agents that serve their respectiverooms can receive the emergency message on their respective roomchannels (and/or other channels) 1318, etc. Then, each of the agents canimplement emergency procedures and transmit messages that the emergencyprocedures have been implemented upstream via their respective channelsin a similar manner, so that the building agent 1302 can receive themessages via the building channel 1304. However, the present disclosureis not limited thereto, and in other embodiments, each of the childagents may also be registered to publish and/or subscribe to messages oneach of their respective parent agents, grandparent agents, etc., sothat messages published on the higher channels can be receivedconcurrently (or simultaneously) by each of the child agents, grandchildagents, etc.

In some embodiments, other channels may also be generated for each ofthe space agents (or other agents) as needed or desired. For example, asshown in FIG. 13, the room agent 1312 also has a corresponding commandchannel 1320 to control the control agent 1326, VAV agent 1328, and AHUagent 1330 via the command channel 1320. In this case, when the roomagent publishes a message, each of the room channel 1318 and the commandchannel 1320 receives the message to monitor, manage, or control theother agents that are subscribed to those channels. However, the presentdisclosure is not limited thereto, and it should be appreciated that anynumber of channels and type of channels as discussed above may begenerated for the space agents and/or other agents as desired orrequired. For example, in other embodiments, the building agent 1302and/or the floor agents 1306, 1308, etc., may also have a correspondingcommand channel to monitor and/or control various equipment or devicesthat serve the entire building (e.g., elevators, building access controldevices, and/or the like) or floor.

Referring now to FIG. 14, a flow diagram illustration a process for abuilding management system simulation is shown, according to anexemplary embodiment. Referring to FIG. 14, the process 1400 starts anda space agent is generated by the agent manager 514 at block 1405 torepresent a space within a building. In some embodiments, the space maybe the building, floor, room, zone, and/or the like. In someembodiments, the space agent is configured to maintain an environmentalcondition (e.g., temperature setpoint, schedule, occupancy status,and/or the like) of the space based on an optimization state (e.g.,optimized for costs, optimized for comfort, and/or the like) of thespace.

In some embodiments, an equipment agent is generated by the agentmanager 514 at block 1410 to represent a device that serves the space.In some embodiments, the device may be, for example, a BMS device, suchas a thermostat, temperature sensor, AHU, VAV, and/or the like. In otherembodiments, the device may be any suitable device, such as an audiovisual device, blinds or shades, digital clock, and/or the like. In someembodiments, the equipment agent controls and/or monitors the device,such that the equipment agent has the same input/output functions of thedevice. In some embodiments, the device is located within the space,whereas in other embodiments, the device is located outside the spacebut configured to serve the space.

In some embodiments, a control agent is generated by the agent manager514 at block 1415. In some embodiments, the control agent has controlfunctions that override or optimize various control functions. In someembodiments, the control agent may be, for example, a global datasharing agent, a temporary occupancy override agent, a scheduledexception agent, a flow setpoint reset agent, an optimal start/stopagent, a reheat valve control agent, an unoccupied mode night setbackagent, a chiller sequencing agent, and/or the like. In some embodiments,the control functions (or control logic) may correspond to theoptimization state of the space. In some embodiments, the controlfunctions override the optimization state of the space. For example, ifthe optimization state of the space is to conserve energy at a certaintime of day, the control function may override the optimization statefor occupant comfort during the certain time of day when the space isstill occupied.

In some embodiments, a space communication channel associated with thespace may be generated by the channel manager 1118 at block 1420. Insome embodiments, each of the space agent, equipment agent, and controlagent may be registered on the space communication channel at block1425. In some embodiments, each of the space agent, equipment agent, andcontrol agent may be configured to publish and/or subscribe to messagesreceived on the space communication channel. In some embodiments,published messages may received from the space agent, the equipmentagent, and/or the control agent and transmitted to at least one of thespace agent, the equipment agent, or the control agent via the spacecommunication channel at block 1430. In some embodiments, a state of thedevice may be changed based on at least one of the messages at block1445. For example, if the device is a VAV and the message relates to achanged temperature setpoint, the VAV may open a damper to change itsstate based on the temperature setpoint.

In some embodiments, the space may be a room within a building, and afloor agent may be generated by the agent manager 514 to represent afloor within the building on which the room is located. In someembodiments, the agent manager 514 may generate a building agent torepresent the building. In some embodiments, the channel manager 1118may generate a floor communication channel associated with the floor anda building communication channel associated with the building. In someembodiments, the building agent and the floor agent may be registered onthe building communication channel to exchange messages. In someembodiments, the floor agent and the room agent may be registered on theroom communication channel to exchange messages. In some embodiments,the building agent may override controls of the other agents (e.g.,floor agent, room agent, equipment agent, and/or control agent) bypublishing messages over the building communication channel, and thefloor agent may override controls of the other agents by publishingmessages on the floor communication channel.

Channel Configuration Examples

In some embodiments, internal messages (e.g. messages within thesimulation) are formatted using a Haystack JSON encoding standard. Anumber of helper functions may be available for formatting simplemessage packets in a Haystack compatible manner and/or parse and extractspecific portions of certain messages. Further, messages from an agentto a web-based user interface, and vice versa, may be serialized asJSON. In some embodiments, messages may be dispatched synchronously orasynchronously. In a synchronous system, the messages are transmitted toa channel, dispatched to agents which subscribe to the channel, and anyresponses are republished if they are provided. In an asynchronoussystem, the messages may be injected into the system by publishingproperly formatted messages to the correct Redis channel. By performingthis process asynchronously, the architecture can be leveraged todemonstrate concurrent/parallel interactions using add-ons or otherextensions to a given configuration.

The decentralized message passing architectures described herein havevarious differences from existing HVAC architectures. For example, thedecentralized message passing architecture may utilize a shared nothingarchitecture, meaning that each agent is independent and self-sufficientwith absolutely no shared state. In this case, the only way for agentsto know about each other in a shared nothing architecture is throughmessages. For example, assuming there is an optimization on an AHU fanspeed, which requires VAV and thermostat information to compute, thefollowing channel configuration may be used:

-   -   EQUIPMENT Channel        -   Publishers:            -   VAV1, VAV2, . . . , VAVn, thermostat1, thermostat2, . .                . , thermostatN        -   Subscribers            -   AHU1

This is needed in order for the AHU to receive the information from thethermostats and VAVs necessary to compute the optimum fan speed. To movethe above optimization logic into its own separate agent (Opt1), thenthe channel may be configured as follows:

-   -   EQUIPMENT Channel        -   Publishers            -   Opt1, VAV1, VAV2, . . . , VAVn, thermostat1,                thermostat2, . . . thermostat        -   Subscribers            -   Opt1, AHU1                The above reconfiguration of the Equipment channel moves                all the optimization logic to Opt1, which can then send                a fan speed command to AHU1.

In some embodiments, the above architecture may further improve changepropagation. For example, due to the decentralized nature of themessaging infrastructure, there can be significant lag time between whena sensor change is first noticed, and when a corrective action happens.Change and corrective actions are reported via messages instead of acentralized state so the number of hops a message has to travel canbecome a limiting factor. As an example, a thermostat may register atemperature increase that should lead to a VAV sending more cooling airand the AHU increasing its fan speed. The propagation of the change mayprogress as follows:

-   -   Thermostat sensor records temperature change    -   Thermostat sends temperature change message    -   VAV receives temperature change message    -   VAV changes it's damper offset    -   VAV sends damper offset change message    -   AHU receives damper offset change message    -   AHU changes it's fan speed

The above message chain delays the AHU from changing its fan speed by atleast the time of two message cycles. Thus, longer chains of changes andcorrective actions will have corresponding longer delays. In someembodiments, to reduce lag time, a command channel can be configured sothat a control agent (Ctrl) can send a message to the AHU to change it'sfan speed while the VAV is changing it's damper offset. In this case,the following channel configuration may be used:

-   -   CONTROL Channel:        -   Publishers            -   Ctrl1, Thermostat        -   Subscribers            -   Ctrl1, VAV, AHU                In this example, the propagation of change may progress                as follows:    -   Thermostat sensor records temperature change    -   Thermostat sends temperature change message    -   Ctrl1 and VAV receives temperature change message    -   Ctrl1 sends a damper offset change message while VAV changes        it's damper offset    -   AHU receives damper offset change message    -   AHU changes it's fan speed

Agents in the above architectures may also frequently have partial orstale information with which to make decisions as a consequence ofcommunicating through asynchronous messages. For example, a VAV agent(VAV1), may have a behavior that is dependent on thermostats A, B, andC. The thermostat messages can arrive in thirteen different ways, asshown here: ({ABC}), ({A}-{BC}), ({A}-{B}-{C}), ({AB}-{C}),({A}-{C}-{B}), ({AC}-{B}), ({B}-{AC}), ({B}-{A}-{C}), ({B}-{C}-{A}),({BC}-{A}), ({C}-{A}-{B}), ({C}-{AB}), ({C}-{B}-{A}). Only ({ABC}) willgive VAV1 a complete up to date view of the thermostat's sensorinformation. All other permutations of message arrivals will have VAV1working with incomplete information. In some embodiments, VAV1 can storeprevious thermostat sensor readings until it has the up to date viewneeded to perform its function.

As discussed above, agents can be used to simulate a BMS. The agents maybe used to represent any aspect of a simulation. The agents can be usedeither at a very specific individual level (e.g., a temperature sensor),or a more complex aggregated level (e.g., an agent that monitors andcoordinates temperature setpoints for a building). In some embodiments,agents only have access to their own internal state, and the content ofany messages published on channels to which they are subscribed.Therefore, an agent can be abstractly described as simply a functionfrom an initial/internal state and (optionally) a set of input messages,to a different internal state and (optionally) a set of output messages.These properties and behaviors are implemented by defining a pluralityof behavioral functions and a display function.

For example, in some embodiments, specific agent behavior is defined byimplementing one or more of the following functions, and optionally afunction defining which portions of their internal state are publishedto various display tools. However, not all functions must be defined tospecify a valid agent, and any functions not defined in a givenimplementation will be no-ops (e.g., no operation). In some embodiments,an agent (such as one of the various types of agents described above)may further be passed into a channel via a parameter for each function,such as behavior functions.

According to an example embodiment, an example message format may berepresented by the following:

{‘<group name (i.e., output, sensor_data, display)>’ : {  ‘<readingname> ‘ : {   ‘value’ : ‘<reading value (often a floating point but notalways)>’ ,   ‘units' : ‘<reading unit>’ ,   ‘title’ : ‘<readingdisplay>’  } }

A list of agents and the last time that they have sent a message may berepresented by the following heartbeatMap:

{: ‘<agent id>’, ‘curVal’: ‘<last timestamp of a heartbeat message>′}

A reading type may be represented by the following metadata ofreadingType:

{′readingType’: ‘<type of reading (e.g., temperature, psi, air flow)>’}

where a reading message type is used to communicate an agent's output orsensors to other agents on the channel by the following:

{‘id’ : ‘<agent id>’ ,  ‘dis' : ‘<description of reading>’ ,  ‘curval’ :‘<a HayStack quantity (e.g., a data structure with  a value andunits)>’}

A sample action message used to give commands to agents on a channel(e.g., change a VAV's setpoint) may be represented by the following:

{‘id’ : ‘<agent id>’ ,  ‘action’ : ‘<action to be performed>’ , ‘actionVal’ : ‘<information necessary to perform the action  (e.g., newsetpoint)>’ }

In some embodiments, a behavior function may be a “per tick update”function. The per tick update function is run once per “tick” for everyagent. The per tick update function is configured to return a list of 0to N messages (where N is a natural number) which will be published tothe agents channels. A tick may be a number on the sequence (0 . . . N)representing a step of time (e.g. five seconds, one minute, or thelike). Generally, a tick has no relation to physical time.

In some embodiments, another behavior function is a message handlingfunction. The message handling function is called for every messagereceived by an agent. The message handling function return value may begenerally expected to be a (possibly empty) array of messages to bepublished as based on the input message. In some embodiments, anotherbehavior function is a sensor read function. The sensor read function isprovided as a semantically distinct place to implement behavior whichsimulates sensor reading for a given agent, or to make a call to actualsensor hardware and integrate the result. The sensor read function canbe configured to modify the internal state of an agent. However, in someembodiments, the return value of the sensor read function may not beused to trigger any sort of message publication, so any sensor changesthat are to result in messages being published to the rest of the systemshould have a matching implementation in the agents tick updatefunction, which may be configured to return a new published messageconditioned on changes in an agent's internal state.

In some embodiments, another behavior function is a public statefunction. The public state function may be called once per tick, and maybe used to return an internal agent state to be published on a channel,such as the Agent State channel. The internal agent state may then bedisplayed via a UI (e.g., WEB UI). For example, a return value of thepublic state function may be represented by the following:

{‘agent’ : ‘<agent id>’  ‘state’ : ‘<publicly publishable state>’}

Accordingly, in some embodiments, for each step through the call cycle,an agent's processes may run in the order of: tickupdate==>read_sensors==>behavior==>public state. A simulation, such asthat described above, may run for a number of ticks specified by theinitial runner script. For every tick, the following actions may beperformed for every agent.

-   -   1. Update_tick—once per tick update function.    -   2. Update_sensor_data—a hook for agents to simulate sensor data        and update their internal state.    -   3. Function_name_here—called for every message received by the        agent. Can optionally return a response/result message to be        published.

While some of the above non-limiting examples are described withreference to controlling and/or monitoring temperature, the presentdisclosure is not limited thereto, and it should be appreciated thatvarious embodiments of the present disclosure may be applied tosimulate, control, and/or monitor any suitable environmental conditions,equipment, or devices of a building, such as humidity, particulatecount, occupancy time (actual and/or expected), lighting, audio/visual,fire safety, electrical, security, access control, lifts/escalators,and/or the like, for example.

Configuration of Exemplary Embodiments

The construction and arrangement of the systems and methods as shown inthe various exemplary embodiments are illustrative only. Although only afew embodiments have been described in detail in this disclosure, manymodifications are possible (e.g., variations in sizes, dimensions,structures, shapes and proportions of the various elements, values ofparameters, mounting arrangements, use of materials, colors,orientations, etc.). For example, the position of elements can bereversed or otherwise varied and the nature or number of discreteelements or positions can be altered or varied. Accordingly, all suchmodifications are intended to be included within the scope of thepresent disclosure. The order or sequence of any process or method stepscan be varied or re-sequenced according to alternative embodiments.Other substitutions, modifications, changes, and omissions can be madein the design, operating conditions and arrangement of the exemplaryembodiments without departing from the scope of the present disclosure.

The present disclosure contemplates methods, systems and programproducts on any machine-readable media for accomplishing variousoperations. The embodiments of the present disclosure can be implementedusing existing computer processors, or by a special purpose computerprocessor for an appropriate system, incorporated for this or anotherpurpose, or by a hardwired system. Embodiments within the scope of thepresent disclosure include program products comprising machine-readablemedia for carrying or having machine-executable instructions or datastructures stored thereon. Such machine-readable media can be anyavailable media that can be accessed by a general purpose or specialpurpose computer or other machine with a processor. By way of example,such machine-readable media can comprise RAM, ROM, EPROM, EEPROM, CD-ROMor other optical disk storage, magnetic disk storage or other magneticstorage devices, or any other medium which can be used to carry or storedesired program code in the form of machine-executable instructions ordata structures and which can be accessed by a general purpose orspecial purpose computer or other machine with a processor. Combinationsof the above are also included within the scope of machine-readablemedia. Machine-executable instructions include, for example,instructions and data which cause a general purpose computer, specialpurpose computer, or special purpose processing machines to perform acertain function or group of functions.

Although the figures show a specific order of method steps, the order ofthe steps may differ from what is depicted. Also two or more steps canbe performed concurrently or with partial concurrence. Such variationwill depend on the software and hardware systems chosen and on designerchoice. All such variations are within the scope of the disclosure.Likewise, software implementations could be accomplished with standardprogramming techniques with rule based logic and other logic toaccomplish the various connection steps, processing steps, comparisonsteps and decision steps.

1-20. (canceled)
 21. A building system comprising one or more memory devices storing instructions thereon that, when executed by one or more processors, cause the one or more processors to: receive data describing a building from a database, the data describing the building comprising an indication of a piece of building equipment; generate a digital twin to provide a representation of the piece of building equipment based on the indication of the piece of building equipment in the data, the digital twin comprising an agent that performs one or more operations to update operation of the piece of building equipment; and deploy the digital twin and execute the agent to perform the one or more operations to update the operation of the piece of building equipment.
 22. The building system of claim 21, wherein the instructions cause the one or more processors to: generate a second digital twin to provide a representation of an entity of the building based on an indication of the entity in the data, the second digital twin comprising a second agent that performs one or more operations for the entity; and register the agent and the second agent to a communication channel.
 23. The building system of claim 21, wherein the instructions cause the one or more processors to: identify a space indicated by the data; generate a space communication channel responsive to identifying the space; determine that the piece of building equipment is located at least partially within the space; and register the agent to the space communication channel responsive to determining that the piece of building equipment is located at least partially within the space.
 24. The building system of claim 21, wherein the piece of building equipment is at least one of a thermostat, a variable air volume unit, or an air handling unit; wherein the agent is configured to perform the one or more operations to update the operation of the thermostat, the variable air volume unit, or the air handling unit.
 25. The building system of claim 21, wherein the instructions cause the one or more processors to: generate a second digital twin based on the data to represent a space of the building, the second digital twin including a space agent that performs operations for the space; and generate a third digital twin based the data to represent a control loop executed by the piece of building equipment, the third digital twin including a control agent that manages the control loop.
 26. The building system of claim 25, wherein the space agent is configured to: perform an optimization to generate a state for the space; and maintain an environmental condition of the space based on the state of the space.
 27. The building system of claim 26, wherein the agent represents the piece of building equipment that serves the space.
 28. The building system of claim 27, wherein the instructions further cause the one or more processors to: register the space agent and the agent to a space communication channel associated with the space; and publish, by the space agent, control commands to the space communication channel; receive, by the agent, the control commands from the space communication channel; and control the piece of building equipment serving the space based on the control commands.
 29. The building system of claim 28, wherein the agent includes control logic to control the environmental condition of the space and is registered to the space communication channel.
 30. The building system of claim 29, wherein the environmental condition of the space is at least one of a temperature setpoint, a schedule, and an occupancy status.
 31. The building system of claim 29, wherein the control agent is configured to communicate with the space agent over the space communication channel to provide the control logic to the space agent.
 32. The building system of claim 31, wherein the space agent is configured to communicate with the agent and the control agent by publishing messages to the space communication channel and receiving messages published by the agent and the control agent from the space communication channel.
 33. A method comprising: receiving, a processing circuit, data describing a building from a database, the data describing the building comprising an indication of a piece of building equipment; generating, by the processing circuit, a digital twin to provide a representation of the piece of building equipment based on the indication of the piece of building equipment in the data, the digital twin comprising an agent that performs one or more operations to update operation of the piece of building equipment; and deploying, by the processing circuit, the digital twin and executing the agent to perform the one or more operations to update the operation of the piece of building equipment.
 34. The method of claim 33, further comprising: generating, by the processing circuit, a second digital twin to provide a representation of an entity of the building based on an indication of the entity in the data, the second digital twin comprising a second agent that performs one or more operations for the entity; and registering, by the processing circuit, the agent and the second agent to a communication channel.
 35. The method of claim 33, further comprising: identifying, by the processing circuit, a space indicated by the data; generating, by the processing circuit, a space communication channel responsive to identifying the space; determining, by the processing circuit, that the piece of building equipment is located at least partially within the space; and registering, by the processing circuit, the agent to the space communication channel responsive to determining that the piece of building equipment is located at least partially within the space.
 36. The method of claim 33, further comprising: generating, by the processing circuit, a second digital twin based on the data to represent a space of the building, the second digital twin including a space agent that performs operations for the space; and generating, by the processing circuit, a third digital twin based the data to represent a control loop executed by the piece of building equipment, the third digital twin including a control agent that manages the control loop.
 37. The method of claim 36, further comprising: performing, by the space agent, an optimization to generate a state for the space; and maintaining, by the space agent, an environmental condition of the space based on the state of the space.
 38. The method of claim 37, wherein the agent represents the piece of building equipment that serves the space.
 39. The method of claim 38, further comprising: registering, by the processing circuit, the space agent and the agent to a space communication channel associated with the space; publishing, by the space agent, control commands to the space communication channel; receiving, by the agent, the control commands from the space communication channel; and controlling, by the agent, the piece of building equipment serving the space based on the control commands.
 40. One or more computer-readable storage media having instructions stored thereon that, when executed by one or more processing circuits, cause the one or more processing circuits to perform operations comprising: receiving data describing a building from a database, the data describing the building comprising an indication of a piece of building equipment; generating a digital twin to provide a representation of the piece of building equipment based on the indication of the piece of building equipment in the data, the digital twin comprising an agent that performs one or more operations to update operation of the piece of building equipment; and deploying the digital twin and executing the agent to perform the one or more operations to update the operation of the piece of building equipment. 